The default umask for Solaris 10 and Ubuntu normal useris 0022, however default umask for CentOS normal user account is 0002.
Hence default directory permissions are 775 and file permission are 664.
The umask creation of new executable file is calculated as follows:
Default permissions 777
subtract umask value 022
Allowed permissions 755
The umask creation of new text file is calculated as follows:
Default permissions 666
subtract umask value 022
Allowed permissions 644
To harden system, umask 027 is always suggested.
Umask value, User, Group, Others
0027 , all , r/w , none
Location to configure default umask
CentOS:
Default System wide umask can be setup in “/etc/bashrc“, “/etc/csh.cshrc“
Default Users umask can be changed in “~/.bash_profile“
Ubuntu:
Default System wide umask can be setup in “/etc/profile“, “/etc/login.defs” and “/etc/skel/.profile“
Default Users umask can be changed in “~/.bash_profile“
Solaris:
Default System wide umask can be setup in “/etc/profile“, “/etc/.login“,”/etc/skel/local.cshrc“,”/etc/skel/local.profile” and “/etc/skel/local.login“
Recent Comments