Umask Calculator
Preview new file and directory permissions, or find a umask for your target modes.
Edit requested modes
Use the modes the application requests before the umask is applied.
- New file
- 644
- rw-r--r--
- New directory
- 755
- rwxr-xr-x
Common umask values
These examples use requested modes of 0666 for files and 0777 for directories.
| Umask | New file | New directory |
|---|---|---|
| 002 | 664 | 775 |
| 022 | 644 | 755 |
| 027 | 640 | 750 |
| 077 | 600 | 700 |
How umask affects new permissions
A umask clears the selected bits in the mode requested by the application. A new regular file often starts from 0666, which has no execute bits. A directory often starts from 0777, where execute permits traversal. If a program asks for a different mode, enter it under Edit requested modes.
The shell command applies to new files and directories created by that shell and its child processes. On Linux, a parent directory's default access control list can take precedence over the umask. Use the chmod calculator to change the mode of an existing file or directory.