Ubuntu Apache Umask

Back to obscure technical topics for a moment.

Figuring out how to set umask for Apache on Ununtu was faaar more difficult than it needs to be. Even though it’s not an environmental variable, the “Ubuntu Way” seems to be to add this to the end of /etc/apache2/envvars like so:

...
## Some packages providing 'www-browser' need '--dump'
#export APACHE_LYNX='www-browser -dump'
umask 000

Restart Apache and voila, the above umask will give all files written by Apache a chmod of 777.

Use this particular example with caution.

Leave a Reply

Your email address will not be published. Required fields are marked *