I recently had a bit of problem when recently by Deploying Django with mod_wsgi due to SELinux. Usually world get a "Permission denied" error (403). This was solved by disabling SELinux.

Is there a way to use mod_wsgi while SELinux is enabled? Now if I was to move my djcode folder to /usr/local/ this would work, but if the djcode folder is stored /usr/local/src/djcode, it will give me again this error.

Cannot load /etc/httpd/modules/mod_wsgi.so into server: /etc/httpd/modules/mod_wsgi.so: cannot restore segment prot after reloc: Permission denied

I have looked at some logs and it says this:

SElinux is preventing the httpd from using potentially mislabel files ./src (src_1)

So how would I allow the httpd use the src folder?

link|improve this question

60% accept rate
feedback

1 Answer

Someone wrote a guide to using SELinux with python web app's (w/ wsgi) here: http://www.packtpub.com/article/selinux-secured-web-hosting-python-based-web-applications

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.