开发者

django directory apache2 permissions

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 tel开发者_JAVA百科l 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


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).


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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜