Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.