umask Calculator

See exactly what permissions new files and directories get from a umask.

What you provide

Result

umask 022 → files 644, directories 755

The execute bit is stripped from new files no matter the umask, so a script you create still needs an explicit chmod +x. Directories keep execute, which is what makes them traversable.

umask 022 — what it takes away

Default for new directories (777)

rwxrwxrwx

What the system would grant with no mask at all

The mask itself (022)

ww

Every bit set here is removed from the defaults above

Result — directories 755

rwxrxrx

What a new directory actually gets

Result — files 644

rwrr

Files start from 666, never 777 — the execute bit is never granted automatically, whatever the umask says

  • Owner
  • Group
  • Others
Diagnostic telemetry
umask
022
New filesFrom the 666 default — files never receive execute from creation
644 (rw-r--r--)
New directoriesFrom the 777 default
755 (rwxr-xr-x)

What this cannot tell you

  • Pure arithmetic on the umask and the standard defaults. It reflects how umask works, not any local override your shell or system may apply.
  • Special bits (setuid, setgid, sticky) are shown only as far as the umask affects them; it does not model default ACLs.

Take this with you

umask Calculator on RunTheTests — free browser-based sysadmin tools, no sign-up.