I'm running a python script under mod_wsgi on apache. The script attempts to create some files under a directory. The path of that directory is defined by this variable named tmpdir
in the script.
My script resides in /var/www/webpy-app/scriptname.py
When the value for tmpdir
is : /home/myname/test
then I get the following error in ssl_error_log
: [Errno 13] Permission denied: '/home/myname/test'
However, when the value for tmpdir is: /var/www/webpy-app/static
then everything works fine.
The permissions for both folders are:
drwxrwxrwx. 2 root root 4096 Oct 12 19:08 static
drwxrwxrwx. 2 myname myname 4096 Oct 12 18:50 test
I start the httpd service as sudo service httpd start
Question
What can I do so that this pythong script running in apache using mod_wsgi can create files under /home/myname/test
?