Umask Calculator

See the permissions new files and folders get for a umask.

Your input

umask 022 files 644 · folders 755
New files get
644 (rw-r--r--)
New folders get
755 (rwxr-xr-x)
  • A umask removes permissions from the defaults: 666 for files (programs are not made executable automatically) and 777 for folders.

What is a umask?

A umask is a setting on Unix systems that removes permissions from every new file and folder. Programs ask for a default: usually 666 for files (read and write, but not execute) and 777 for folders. The umask then takes away the permission bits it contains.

With the common umask 022, group and others lose write permission, so new files are 644 (rw-r--r--) and new folders are 755 (rwxr-xr-x). With umask 077, only the owner keeps access, giving 600 files and 700 folders. This tool shows the result for any umask of three or four octal digits.

How to use the Umask Calculator

  1. Type a umask of three or four octal digits, such as 022.
  2. Read the permissions for new files and folders.
  3. Compare with the table of defaults before choosing.

Real situations

When people use the Umask Calculator

  • 1

    Set safe defaults for a server user

    Choose a umask so new files are private to the user or shared with a group, as your setup needs.

  • 2

    Understand why files get 644

    See how the 022 default on most systems turns into 644 and 755.

  • 3

    Prepare a shared project folder

    Use 002 so group members can write to each other's new files.

  • 4

    Check a shell or deploy script

    Confirm what permissions files will end up with before running a script that creates them.

FAQ

Umask Calculator: questions answered

What does umask 022 give?

New files are 644 (rw-r--r--) and new folders are 755 (rwxr-xr-x). The owner can write, and everyone else can only read. It is the usual default on most Linux systems.

What does umask 077 give?

New files are 600 (rw-------) and new folders are 700 (rwx------). Only the owner has any access. It is a common choice for privacy-sensitive accounts.

What does umask 002 give?

New files are 664 (rw-rw-r--) and new folders are 775 (rwxrwxr-x). The group can write too, which suits shared project folders where users are in the same group.

Why are new files never executable by default?

Programs request 666 for files, not 777, so execute bits are not set unless you run chmod. This avoids making every file you create into something that can be run.

How is the result calculated?

The umask bits are removed from the default. For files, 666 minus the bits in 022 gives 644. For folders, 777 minus 022 gives 755. Strictly it is a bitwise operation, not a subtraction, but the answer is the same for ordinary values.

How do I set or see my umask?

Type umask in a shell to see it and umask 022 to set it for that session. To keep it, add the command to your shell start-up file or the service's configuration.

Is this Umask Calculator free and private?

Yes. It is free with no sign-in, and every calculation runs inside your browser. Nothing you type is sent to a server or stored, and the page keeps working offline once it has loaded.

Private by design. No accounts, no cookies, no tracking. Everything you type stays on your device.

How we keep it that way