WebFaction
Community site: login 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:

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.

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 11 May '11, 02:21

zwei
111
accept rate: 0%

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?

(11 May '11, 02:25) ryans ♦♦

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!

(11 May '11, 08:31) zwei
Be the first one to answer this question!
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

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×337
×12

question asked: 11 May '11, 02:21

question was seen: 4,128 times

last updated: 11 May '11, 08:31

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM