Contents
How do I use the umask command in Linux?
To view the current umask value, we use the umask command. Running the umask command by itself provide the default permissions that are assigned when a file or folder is created. To change these values, we will use the following command.
…
The Umask Command Syntax.
| Number | Permission |
|---|---|
| 2 | write |
| 1 | execute |
How do I use umask?
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). The remainder is the value to use with the umask command. For example, suppose you want to change the default mode for files to 644 ( rw-r–r– ).