Since we know nothing about your specific Django application, it is hard to 
guide you. All we can do is point you at the Django documentation and for you 
to work out what you need to change. If for example you are using a file system 
based cache and specified a relative directive rather than an absolute path, 
the documentation at:

https://docs.djangoproject.com/en/dev/topics/cache/#filesystem-caching

may or may not be useful.

At this point you may be better asking on django-users list given it appears to 
be more of a Django configuration issue.

Graham

On 03/08/2013, at 2:05 PM, Frank He <[email protected]> wrote:

> Seemed like this is configuration of cache directory, are there any setting 
> that can change cache directory in django setting?
> 
> On Friday, August 2, 2013 7:53:46 PM UTC-7, Graham Dumpleton wrote:
> Mostly it looks like a relative pathname is being used rather than absolute. 
> Thus is trying to right to / as that is what working directory usually is. So 
> permissions is an issue, but using an absolute path to a specific directory 
> would be the first thing to solve.
> 
> Graham
> 
> On 03/08/2013, at 9:51 AM, Jason Garber <[email protected]> wrote:
> 
>> 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.
>>  
>>  
> 
> 
> -- 
> 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