mardi 4 août 2015

Flask Permission Denied Opening File

As part of a Flask app I have, there's a page that opens a log file. When the app is run with the Flask debug server, the page works correctly. However, when run with Gunicorn, an exception is thrown:

IOError: [Errno 13] Permission denied: '/var/log/gunicorn/app.log'

I checked, and the path to the file is correct, and the permissions for the file are:

-rw-rw-rw- 1 root root 1.3M Aug 4 12:01 app.log

Shouldn't any application be able to read (and write to, for that matter) this file? I'm not sure what is causing this error.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire