I have a python/flask app running on apache server on a VPS running ubuntu 16.04.
When accessed from web, the app gives "internal server error" when trying to make a folder (called "organizations") inside /var/www/FlaskApp/FlaskApp. The exact error from Apache logs is this:
PermissionError: [Errno 13] Permission denied: 'organizations'
I did set permission of this folder (and folders above it) to 777. The permission denied error still persists. (yes, I know I shouldn't use 777. This is just a test server. And I will switch it back to 755 or 775 as soon as I figure out what the issue is)
I have tried to play around with other possible permission settings. I have tried setting the user 'www-data' as the owner of the folder using chown. Ive tried setting the ownerhsip of www-data using groups. Nothing seems to work.
If it is any use, im using Ubuntu 16.04 on a VPS, with apache2 serving a Python3/Flask application. The permission denied error occurs when the flask application tries to create a folder called "organizations" inside /var/www/FlaskApp/FlaskApp
Flask App permissions are set to 777, as are permissions of all folders above it. I asked this question on stack overflow, they said this would be a better forum to post it.