+(91)70149-37521Subscribe Now
LINUXPANDA / FREE LINUX TOOLS

Linux chmod & umask Calculator

Use this chmod calculator to convert Linux file permissions between octal and symbolic notation. Build a command, understand special bits and calculate umask defaults.

By · Last tested · Free, no signup
PERMISSION WORKBENCHPrivate · Runs in your browser
AccessOwnerGroupOthers
Read 4
Write 2
Execute 1
Special permissions Advanced

These bits change execution or directory behavior. Read the explanations below before applying them.

755
rwxr-xr-x

Replace this example with your own path. Nothing is executed.

chmod 755 -- '/path/to/file'
Equivalent symbolic command

umask calculator

See the usual permissions for newly created files and directories.

New regular file644rw-r--r--
New directory755rwxr-xr-x

Assumes a requested mode of 666 for files and 777 for directories, with no default ACL. umask removes bits; it does not change existing files.

This interactive calculator needs JavaScript. The examples and permission reference below remain available.

How to use the chmod calculator

Select the read, write and execute permissions for the owner, group and others. The chmod calculator updates the octal value, symbolic permission string and command immediately. You can also enter an existing three- or four-digit octal mode, or a permission string such as rwxr-xr-x, and choose Apply.

Choose Regular file or Directory to see the correct access explanation. Replace the example path, review the generated command, then copy it into your own terminal when ready. This tool never runs commands or uploads your entries. Usage events record actions such as copying a result, without collecting paths or permission inputs.

The symbolic input accepts permission strings from ls -l, including an optional file-type character. It does not parse arbitrary relative chmod expressions such as g+w. If you enter a symlink’s displayed mode, remember that Linux normally controls access through its target rather than the link’s permission bits.

What do Linux permission numbers mean?

Each ordinary permission digit adds three bits: read is 4, write is 2 and execute is 1. The digits apply to the owner, group and others in that order. For example, 755 means the owner has all three permissions, while the group and others can read and execute.

Bit Regular file Directory
Read (4) Read file contents List entry names
Write (2) Modify file contents Modify entries, normally with execute/search access
Execute (1) Attempt to execute a program Traverse or search the directory

Deleting a file depends primarily on the parent directory’s permissions, not whether the file itself is writable. Directory traversal also requires search permission along the path. Read more in the Linux path resolution manual.

Mode bits describe only one layer of access control. Ownership, supplementary groups, ACLs, SELinux or AppArmor policy, capabilities, mount options and read-only filesystems may change the outcome. This is a mode calculator, not an effective-access audit of your machine.

Common chmod values: 644, 755, 600 and 700

Mode Symbolic Typical use
644 rw-r--r-- Ordinary file readable by other users
755 rwxr-xr-x Executable or directory others may access
600 rw------- Private file, such as an SSH private key
700 rwx------ Private directory or executable
640 rw-r----- File shared read-only with its group
2770 rwxrws--- Group directory using setgid inheritance
1777 rwxrwxrwt Shared writable directory with restricted deletion

These are examples, not universal recommendations. A web service needs access through its own user or group; opening every permission is not a substitute for correct ownership. For a practical example, see our guide to SSH key authentication on Linux and our Linux server hardening guide.

What do setuid, setgid and the sticky bit do?

A fourth octal digit represents special bits: setuid is 4, setgid is 2 and sticky is 1. They combine just like the ordinary digits.

  • setuid: supported executable files can run with their owner’s effective user ID. It does not automatically mean root; that depends on ownership. Linux ignores setuid on interpreter scripts and normally on directories.
  • setgid: an executable can run with its group’s effective group ID. On a directory, new children normally inherit its group, and new subdirectories also inherit setgid.
  • Sticky: on a writable directory, it restricts who can delete or rename entries. It does not prevent reading or editing file contents when other permissions allow those actions.

The symbolic display uses s or t when execute is also enabled, and uppercase S or T when it is absent. For example, 4644 becomes rwSr--r--. A filesystem or security rule may prevent special bits from taking effect; see chmod(1).

For directories, GNU chmod preserves existing setuid and setgid bits with some ordinary numeric modes. The directory command above uses a five-digit mode to explicitly set or clear those bits. This behavior targets GNU/Linux; see GNU’s directory special-bit documentation.

How does the umask calculator work?

umask removes permission bits when a process creates a file or directory. The formula is requested_mode & ~umask, limited to the permission bits. It is not ordinary decimal or octal subtraction.

The calculator assumes the usual requested modes of 666 for new regular files and 777 for directories. With 022, the results are file mode 644 and directory mode 755. With 077, they are 600 and 700.

Applications can request stricter permissions. A default ACL on the parent directory can also change creation behavior, so the displayed results are the standard no-default-ACL case. The Linux umask manual describes that exception.

Run umask in your shell to inspect its current mask. A command such as umask 027 changes that shell’s mask for future creation operations and is inherited by its child processes. It does not change existing files, and other services may use their own masks.

How can you apply permissions safely?

  1. Inspect the target and ownership using ls -ld -- '/path/to/target' or stat -- '/path/to/target'.
  2. Grant only the access required by the user, group or service.
  3. Review the quoted path and mode before running the generated command.
  4. Verify the mode and test access as the intended user.

The generated command uses -- to end option parsing and shell quoting for the path. It does not add sudo or recursive changes. Use elevated privileges only when needed and understood.

Avoid blanket recursive changes. Applying chmod -R 755 to a tree gives execute permission to regular files as well as directories. Review file and directory requirements separately. Do not use 777 as a general repair for a web-server or application permission error.

Frequently asked questions

What is the difference between chmod 755 and 777?

Both allow everyone to read and execute. With 755, only the owner can write; with 777, the group and others can write too. That extra access can be dangerous for application files and writable directories.

Does chmod 644 make a directory usable?

Usually not for normal directory access. It has no execute/search bit, so users cannot traverse it normally. A typical public directory uses 755, but the correct choice depends on its access requirements.

Does umask change existing file permissions?

No. umask affects creation operations. Use chmod when you intend to change an existing file or directory’s mode.

Why do I still get Permission denied?

Check ownership, parent-directory traversal, ACLs, security policy, mount options and the actual service user. Setting a visible mode alone does not guarantee access.

Can I paste chmod u+x into the calculator?

The converter accepts absolute octal modes or ls-style permission strings. A relative expression such as u+x needs the existing mode to determine its complete result, so this version does not accept it.

Is this chmod calculator free?

Yes. No account or upload is required. Permission calculations and path handling happen in your browser. The generated command is text for you to review.

Sources and verification

Reviewed by Raj. Calculations are checked against all 4,096 mode combinations and all 512 three-digit umasks. The references below explain the behavior and limits:

Browse LinuxPanda tools · Found an incorrect result? Report it to LinuxPanda.

Subscribe to Our Newsletter

Get free how-to tutorials and over 700+ courses. Seo tips, create a wordpress, or learn a new skill.