1

I'm using supervisord to handle some gevent based wsgi processes that simply run a django app.

When I upload files I want them to have rw permissions for user and group (www-data) and of course I want the folders to have execute permissions for user and group as well.

Normally a umask would subtrack from 777 for folders but 666 for files, however I find that setting the umask in a supervisor config results in the same permissions for files and folders, so when I set umask to 002, all the files uploaded get execute permissions. I also tried setting the umask to 113 but then I can't execute any folders.

I'm not 100% sure this is supervisors fault and not gevent or django related. Any ideas?

1 Answer 1

2

I promptly discovered that django was the culprit.

After setting FILE_UPLOAD_PERMISSIONS in the django apps' settings to 0664 the umask works as expected.

ie. in settings.py:

FILE_UPLOAD_PERMISSIONS = 0664

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .