Skip to main content

chmod Calculator

By Dejan Panovski Updated on

Toggle the permission bits to watch the octal value, symbolic notation, and chmod command update live. You can also paste an octal or symbolic value to work backward.

Toggle read, write, and execute for owner, group, and others
ClassReadWriteExecute
owner
group
others
Special bits
Octal
Symbolic
Command

How Linux permissions map to bits

Every file and directory has three permission classes: the owner, the group, and everyone else (others). Each class carries three permission bits:

  • read (r) has the value 4
  • write (w) has the value 2
  • execute (x) has the value 1

Add the values for a class to get its octal digit. Read and write is 4 + 2 = 6, read and execute is 4 + 1 = 5, and all three is 4 + 2 + 1 = 7. Line up the digits for owner, group, and others and you get the familiar three digit mode, such as 644 or 755.

Symbolic notation shows the same information as nine characters, three per class, in the order read, write, execute. A dash means the bit is off, so rw-r--r-- is the symbolic form of 644.

Common permission modes

ModeSymbolicTypical use
644rw-r–r–Regular files that the owner edits and everyone reads
755rwxr-xr-xDirectories and scripts: owner full access, others read and run
600rw——-Private files such as SSH keys and credentials
700rwx——Private directories only the owner may enter
777rwxrwxrwxFull access for everyone, which is rarely safe. See what 777 means before using it

Special bits

A fourth, leading digit sets the special bits:

  • setuid (4) runs an executable with the owner’s privileges
  • setgid (2) makes new files in a directory inherit the group, and runs executables with the group’s privileges
  • the sticky bit (1) on a shared directory lets only a file’s owner delete or rename it, which is how /tmp works

When a special bit is set, its execute position in the symbolic output changes: a lowercase s or t means execute is also on, while an uppercase S or T means execute is off. For the full command syntax and recursive changes, see the chmod command guide .