Supervisor / Unix Permission Denied to write in directory

When I run my program and try to create a file, I am getting the following error:

IOError: [Errno 13] Permission denied: '/home/giri26/couponmonk_project/user_15_qr.png'

I run my program using supervisor and this is the config file:

directory = /home/giri26/couponmonk_project
command = /home/giri26/venv/py2.7/bin/python /home/giri26/venv/py2.7/bin/gunicorn --worker-class socketio.sgunicorn.GeventSocketIOWorker __init__:app 
stdout_logfile = /var/log/gunicorn/couponmonk-std.log
stderr_logfile = /var/log/gunicorn/couponmonk-err.log
user = newuser

I thought this error was referring to the permissions for newuser so I added newuser to the group giri26.

Running groups newuser results in:

newuser : giri26

The results of ls -ld couponmonk_project/ is:

drwxrwxr-x 3 giri26 giri26 4096 Jun 27 22:34 couponmonk_project/

I figured that as newuser is part of the group giri26 and the group has rwx permissions, then I would be able to write and create files in the couponmonk_project folder.

Am I looking at this correctly?

Thanks for your help.

Source: unix

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.