The umask command changes the default protection mode for all files and directories subsequently created. umask is initially called from within the .cshrc initialization file to set your default protection value. To use umask, you provide a three-digit octal number that has bits set where you want permissions to be removed:
umask 033
mkdir pascal
The directory pascal will be created with the following mode:
| 1cDirectory | 1cUser | 1cGroup | 1cOthers |
| d | rwx | r | r |
umask 077++++++++++++ (the usual setting in .cshrc) umask 077 (the usual setting in .cshrc) gcc -o life life.c (produces an executable file, life)
The file life will have the following protection mode:
| 1cDirectory | 1cUser | 1cGroup | 1cOthers |
| rwx |