login community faq

Hi. I am wondering if anyone here has encountered a similar issue. In my project, I create folders for every new submission received and currently, I get a "[Errno 13] Permission denied: 'user'" when my script executes the "os.makedirs" command. I am assuming that the user refers to my account "zwei" but is there anyway to verify this?

I came across some earlier posts of a similar nature and changed the facl for the project to see if they would work. Currently, running "getfacl" returns me the following result:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
file: <<projectname>>
owner: zwei
group: zwei
user::rwx
user:zwei:rwx
group::rwx
group:zwei:rwx
mask::rwx
other::r-x
default:user::rwx
default:group::r-x
default:other::r-x

I'm not exactly familiar with File Access Control List but am I missing something here? I am also including the tracestack below for reference.

1
2
3
4
5
6
7
8
9
File "/home/zwei/webapps/{project}/{app}/models.py", line 163, in save_upload
  os.makedirs(usrtmpdir, mode=0775)
File "/usr/local/lib/python2.7/os.py", line 150, in makedirs
  makedirs(head, mode)
File "/usr/local/lib/python2.7/os.py", line 150, in makedirs
  makedirs(head, mode)
File "/usr/local/lib/python2.7/os.py", line 157, in makedirs
  mkdir(name, mode)
OSError: [Errno 13] Permission denied: 'user'

Thanks in advance. I've been spending way too much time stuck at this problem...

asked May 11 '11 at 02:21

zwei's gravatar image

zwei
11

If you are creating a directory owned by your user somewhere within your own user's home directory, you shouldn't need to use ACLs at all.

What is the path, specifically, of the directory that you are attempting to create?

Also, are you attempting to create a new subdirectory of the "webapps" directory?

(May 11 '11 at 02:25) ryans ♦♦ ryans's gravatar image

hi ryans, sincerest thanks for replying. i figured out the reason for my problem after reading your response; i am relying on django's "default_storage.save()" command to save submitted files and was passing in the relative paths unique to each submission; i was trying to create the submission folders using those relative paths and not their absolute paths.

apologies for any inconvenience caused!

(May 11 '11 at 08:31) zwei zwei's gravatar image
Be the first one to answer this question!
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×643
×229
×11

Asked: May 11 '11 at 02:21

Seen: 1,003 times

Last updated: May 11 '11 at 08:31

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited