Umask Calculator

Preview new file and directory permissions, or find a umask for your target modes.

Calculation
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.

UmaskNew fileNew directory
002664775
022644755
027640750
077600700

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.

Linux umask reference · Bash umask command