Sounds like you need a traceback to see what it was trying to do.  Check
this:

http://stackoverflow.com/questions/4839762/how-do-i-use-djangos-logger-to-log-a-traceback-when-i-tell-it-to

Also, assuming you are in daemon mode, the wsgi python process will inherit
the apache user/group unless overridden with the arguments `user` and
`group` to your WSGIProcessGroup directive in the apache configuration.

You have a couple of options:

1. make this file/dir writable by `apache` (or your webserver user)
2. see if you can move it to /tmp via django config  (best?)
3. add user and group parameters to WSGIProcessGroup so that it runs as the
user that owns your files (potential security issues like writing
executable code)

Not really a mod_wsgi problem, by the way, but I hope this helps point you
to an answer.

J





On Fri, Aug 2, 2013 at 9:05 PM, Frank He <[email protected]> wrote:

> I am now deploying my django project using apache mod_wsgi, after a lot
> effort, it is near the end. But now when I run my project directly, I am
> stuck with a permission issue, and got this error:
>
> OSError at /
>
> [Errno 13] Permission denied: '.cache'
>
>  Request Method: GET  Request URL: http://10.3.94.239/  Django Version:
> 1.4  Exception Type: OSError  Exception Value:
>
> [Errno 13] Permission denied: '.cache'
>
>  Exception Location: /usr/lib/python2.6/os.py in makedirs, line 157  Python
> Executable: /usr/bin/python
> I believe this is because the cache can not be written, so natually,  I
> need to change its permission. But WHERE?
>
> I don't know how to find out the directory.
>
> Can you tell me anything about this?
>
> Thanks very much in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to