Set the default file permissions
umask
numbers correspond to the 3 digit binary number that controls,
rwx
permissions. Everywhere there’s a 1
it un-sets the file
permission. Example: umask 0022
Default is 666 for files and 777 for directories.
Original file mode | — rw- rw- rw- |
Mask | 000 000 010 010 |
Result | — rw- r– r– |
Default umask
is 0022.
[akraker@server1 ~]$ umask
0022
Therefore all directories created with the default umask are 755 and files are 644.