Setting Apache umask

Problem was that uploaded files were being assigned permissions of 0600 which is “-rw——-“. The webserver was then unable to service the files. The “0600” permissions corresponds to a umask of “066”. Instead I wanted “022” which would yield “-rw-rw-r–” or “0664”.

On Ubuntu, edit /etc/apache2/envvars and add this line to the end of the file:

On Red Hat/CentOS do this:

Now restart Apache and the new umask will be in effect.

Have a project or a problem?

Talk with a senior engineer for practical recommendations—no obligation.

Leave a comment

3 Responses

Leave a Reply

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

Related Posts

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.