Friday, March 18, 2011

Re: Permision Denied on share acces

On Fri, Mar 18, 2011 at 2:57 PM, mik3langelo <mik3langelo@gmail.com> wrote:
> i got a problem that drains me. I created an application/interface
> that a certain thing would need to create a file on a particular
> share. problem is that I get IOError code 13. There are some
> restrictions in Django that they not know?
> strange is that if I make a first os.path.isdir () and returns ok, but
> when I try to do os.mkdir () failed
>
> suggestions?
>
> Thanks in advance
>

Two suggestions:

1) Ask usage question on django-users
2) If your django app requires write access to a directory, give write
access to the user who runs the django app.

It's not strange that you can check whether a path is a directory, but
not create a directory on that path, it is entirely normal. It just
means you're not allowed to write there, usually deliberately:

>>> os.path.isdir('/usr/lib')
True
>>> os.mkdir('/usr/lib/i-am-not-root')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 13] Permission denied: '/usr/lib/i-am-not-root'

Cheers

Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate