Symptoms
You may find that files and directories are created with incorrect or unexpected permissions.
Cause
A few factors can influence the permissions that files are created with, including the default umask or the File-Access Control List set on the filesystem.
Resolution
If permissions are not specified on file creation, the umask value is subtracted from the default files and directory permission to obtain the final permissions that will be used. If the umask is non-standard, this may result in incorrect or unexpected permissions being used. The default umask is 0022, and it can be checked with the following command:
# umask
The following configuration files can be used to change the default umask value:
- /etc/login.defs
- /etc/profile
- /etc/bashrc
- /home/$username/.bashrc
Note: Replace $username with the cPanel username.
File-Access Control Lists (FACL) for a directory may influence the permissions for files and directories created inside of it. A default FACL will show just the basic permissions of the directory:
# getfacl /home
Note: If an FACL has been changed for a directory, it is recommended to work with a System Administrator to determine if this is necessary, and to restore the default.
Comments
0 comments
Article is closed for comments.