OS: CentOs
Whenever apache (apache2) creates a file or directory it automatically sets the permissions to 777. I want it's directories to be 775 and files 664. How can I fix this?
|
|
|
Put |
|||
|
|
|
Set the
|
|||
|
|
|
Check /etc/bashrc. It should already (at least on a CentOS machine) have the following stanzas:
This should already be getting you the behavior you want, unless you installed a custom apache, and created the apache user yourself. Even then, it shouldn't be getting 000 as the umask unless that's already explicitly set up somewhere. I mention this only because your system is exhibiting signs of a non-standard config, and because of that, it's possible that other users (system or otherwise) are also getting this far too broad file creation mask. |
|||||||||
|