First understand what is umask and what exactly this value do if admin create file or directory on UNIX and Linux system.
Answer: umask value determines final permission value for directory and file, which admin create.
so by changing this value admin can customize these permission according to security requirement.
default value of umask is 022.
How Directory and file how umask calculated ?
Ans:
Directory: 777-022 = 755 Final permission for directory after umask subtract.
File: 666-022 = 644 Final permission for File after umask subtract.
.Lets see what is the scenario............
Scenario:
For user oracle change umask value from 022 to 002.
Solution : answer to this request is simply edit .profile using vi editor and add line umask 0002 and save file. After saving file log out and log in to user account to make these changes effective or reload .profile using any one below mentioned command.
Reload .profile using using any one command from following list.
1. oracle#/home/oracle: . $HOME/.profile
2.oracle#/home/oracle: . .profile
After reload of .profile if admin execute "umask" command he will see changed umask value from 022 to 002. This method is useful in situation where this value need to persistent.
Thanks.