tags:

views:

23

answers:

2

Hey I just got apache2 working with mod_wsgi on my django_project directory, which is pretty kool. However I can only make it work if I set the permissions on my django_project to chmod -R 777 django_project not so nice I believe.

Can anyone tell me what chmod -R xxx django_project I should be running. Im not too tight on the whole linux-group-permissions. eg how do I tell what perm-group apache is in?

Thanks, N

A: 

I believe only static directory needs to be writable by Apache in your case and not entire project directory.

You don't need 777 definitely, all you need is apache user (unless you have other user configured in WSGIDaemonProcess directive ) to own that directory.

Running ps -ef | grep httpd will show the user apache is running as. (Some OS may use apache instead of httpd but you get the idea).

Srikanth Chundi
A: 

Also you can see ls -l /var/www/ and it'll show you user-onwer and group-owner for the directory. You should make permissions for django_project similar to /var/www/.

And writable permission is necessary for a socket if it's used (in fasctcgi-scheme)

mapcuk
Thanks, group and owner is set as "root." is this normal???
Niall
It depends of by whom httpd process was runned .. if by root it's ok.
mapcuk