Umask, or the user file-creation mode, is a Linux command that is used to assign the default file permission sets for newly created folders and files. The term mask references the grouping of the permission bits, each of which defines how its corresponding permission is set for newly created files.
What is the default Umask?
By default, the system sets the permissions on a text file to 666, which grants read and write permission to user, group, and others, and to 777 on a directory or executable file. … The value assigned by the umask command is subtracted from the default.
What is the default umask value in Linux?
For example, if umask is set to 022, 22 is displayed. To determine the umask value you want to set, subtract the value of the permissions you want from 666 (for a file) or 777 (for a directory).
…
Default File Permissions ( umask )
| umask Octal Value | File Permissions | Directory Permissions |
|---|---|---|
| 3 | r– | r– |
| 4 | -w- | -wx |
| 5 | -w- | -w- |
| 6 | –x | –x |