November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Setup Umask

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

Default Users umask can be changed in “~/local.cshrc

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>