- Back to Home »
- Linux Shell Commands »
- How To Setup Default umask Under Linux?
Posted by : FixNox
Wednesday, 12 September 2012
Umask is the number subtracted from the standard permissions when creating a file. Example: each new folder is by default created with 777, so when umask is set to 022, the result is that the permissions will be 777 – 022 = 755.
Most of the time umask will already be set by your distro to 022 but you can change it if you like. You can see what umask value is set with:
If you want to change umask for temporally,
Note: These value will stay until you log out and then return to its default value.
To make it permanent, edit /etc/bashrc or to your ~/.bash_profile.
Most of the time umask will already be set by your distro to 022 but you can change it if you like. You can see what umask value is set with:
# umask
0022If you want to change umask for temporally,
# umask 0044
Note: These value will stay until you log out and then return to its default value.
To make it permanent, edit /etc/bashrc or to your ~/.bash_profile.
An amazing piece of information about Linux. I like to know what is the difference between Linux website hosting and Windows web hosting?
ReplyDeleteLinux website hosting