Skip to content

How to change the default umask for Apache/Php

by admin on July 9th, 2014

Apache/Php umask determines the permissions for the newly created files. On a VPS / Dedicated server you can change the umask to suit your specific needs by editing:

/usr/local/apache/bin/envvars

To make this change persistent create a file called umask with the digits 022 as contents in /var/cpanel/easy/apache/rawenv/

There you should add:

umask 022

Right after that restart Apache and Apache/Php’s default umask will become 22.

If not working you could check /etc/login.defs and change/uncomment umask to 022 and/or append umask 022 to /etc/sysconfig/httpd .

No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS