mod_wsgi working directory and user
问题 I'm running flask on mod_wsgi. my flask app, which is on /var/www/app receives some file from user and saves it to /var/www/app/tmp directory. However even after all chmod and chown(thought it was a permission problem), I was unable to reach that tmp directory. After some debugging I found out that the current working directory of the flask app is / . I can change working directory by os.chdir('/var/www/') , but I'd like to avoid that for security concerns. here is my apache configuration: