Umask Calculator

Work out the default permissions for new files and directories from a umask value. Enter the umask in octal, such as 022, and see the resulting octal and symbolic permissions.

1 Fill in the box

2 Your answer

Your answer shows here as you type.

How to use the Umask Calculator

  1. Enter the umask in octal, for example 022 or 002.
  2. Read the default permissions for new files in the first result.
  3. Read the default permissions for new directories in the second result.

Frequently asked questions

What is a umask?

A umask is a set of permission bits that the system removes from the default permissions when a new file or directory is created. It is written in octal, like 022.

How is the permission for a new file calculated?

New files start from 666 (rw-rw-rw-), and the result is 666 minus the umask bits, so a umask of 022 gives 644. New directories start from 777, so the same umask gives 755.

What umask is most common?

022 is the usual default on many Linux and Unix systems, giving files 644 and directories 755. Some distributions use 002 for users in their own group, giving files 664 and directories 775.

Does a four-digit umask change the result?

The first digit holds the special bits (setuid, setgid, sticky). It is ignored when creating new files and directories, so only the last three digits set the default permissions.

Wrote something with AI? Slop Monkey rewrites it so it sounds like you, and keeps your facts.