I'm establishing a Light server and want to set Apache's umask setting to 002 to ensure that all Apache-produced files possess the group write permission bit set (so people of the identical group can overwrite the files).

Does anybody understand how to do that? I understand that on Ubuntu, you should use the /etc/apache2/envvars file to configure the umask, however the server is running CentOS.

Update This relates to another I requested not long ago (http://stackoverflow.com/questions/174715/linux-customers-and-groups-for-a-light-server). If prefered, please update this other question using what the very best set-up is by using for getting a developer user on the server that may edit files produced through the apache user.

For CentOS along with other Red-colored Hat distros, add the umask setting to /etc/sysconfig/httpd and restart apache.

[root ~]$ echo "umask 002" >> /etc/sysconfig/httpd

[root ~]$ service httpd restart

More information: Apache2 umask MDLog:/sysadmin

For Debian and Ubuntu systems, you'd similarly edit /etc/apache2/envvars.

Apache gets its umask from the parent process (i.e. the procedure beginning Apache) this will typically function as the /etc/init.d script. So put a umask command for the reason that script.

Moving from the "tried and tested Apache way" is generally not suggested. Time and effort and difficult won experience went into picking a may be.