Skip to content

Chmod Calculator

Tick read, write and execute for owner, group and other to get the octal chmod value, the symbolic string and the command to run.

Runs in your browserFree, no sign-up

Settings

Results update automatically as you type.

Permissions

Octal
755
The number you pass to chmod
Symbolic
rwxr-xr-x
As shown by ls -l
Owner
rwx (7)
Group
r-x (5)
Other
r-x (5)

Command

chmod 755 file.txt

Common permission values

OctalSymbolicTypically used for
644rw-r--r--Regular files — owner edits, everyone reads
755rwxr-xr-xDirectories and executables
600rw-------Private files such as SSH keys and .env
700rwx------Private directories, e.g. ~/.ssh
664rw-rw-r--Group-writable shared files
777rwxrwxrwxEverything for everyone — avoid on real servers

What Chmod Calculator does

A chmod calculator turns the permissions you actually want into the number the command expects. Tick read, write and execute for the file's owner, its group and everyone else, and you get three things at once: the octal value such as 755, the symbolic string such as rwxr-xr-x that ls -l prints, and the finished command ready to paste into a terminal. Working in the other direction is just as useful — the reference table below shows what the values you keep meeting in tutorials and error messages actually grant, so 644 and 600 stop being magic numbers you copy without understanding.

How to use it

  1. 1

    Tick the permissions you want for the owner — the user account that owns the file.

  2. 2

    Do the same for the group, then for other, which means every remaining user on the system.

  3. 3

    Enter the file or directory path so the generated command is ready to run as-is.

  4. 4

    Copy the chmod command, or note the octal value if you are setting permissions from a script or Dockerfile.

How the three digits are built

Each digit is a sum of three independent bits: read is worth 4, write is worth 2 and execute is worth 1. Because those values are powers of two, every combination produces a unique total between 0 and 7, which is why a single digit can describe all eight possible states without ambiguity. Read plus write plus execute is 4 + 2 + 1 = 7, read plus execute is 4 + 1 = 5, and read plus write is 4 + 2 = 6. The three digits are then applied in a fixed order — owner, group, other — so 755 reads as 'the owner gets everything, the group gets read and execute, everyone else gets read and execute'. Understanding the arithmetic means you never have to memorise the common values: you can reconstruct any of them in a couple of seconds, and you can read an unfamiliar one such as 640 and immediately know it grants the owner read and write, the group read only, and everyone else nothing at all.

Why execute means something different on a directory

On a regular file, the execute bit means the kernel may run it as a program. On a directory it means something quite different: permission to traverse into it and access the entries inside by name. This is why directories are almost always 755 while files are 644, and why removing the execute bit from a directory locks out access to everything below it even when the files themselves are world-readable. The read bit on a directory is also narrower than people expect — it grants permission to list the names of the entries, but not to access them. A directory with read but not execute lets you see that a file exists while refusing every attempt to open it, which produces confusing 'permission denied' errors that look like they are coming from the file rather than the directory above it.

Where this helps

Fixing web server permission errors

A 403 from Apache or nginx is very often a permissions problem. Web content usually wants 644 for files and 755 for directories so the server user can read and traverse them.

Locking down SSH keys

SSH refuses to use a private key that other users can read. Setting the key to 600 and the ~/.ssh directory to 700 is the standard fix for 'permissions are too open'.

Making a script executable

A shell script needs the execute bit before it will run directly. 755 lets everyone run it while keeping edits limited to the owner.

Reviewing what a tutorial is telling you to do

Before running a chmod command copied from the internet, decode it here. If it says 777, you now know it is granting write access to every account on the machine.

Tips

  • Set directories to 755 and files to 644 as your default; deviate only when you have a specific reason.
  • Use `find . -type d -exec chmod 755 {} +` and `find . -type f -exec chmod 644 {} +` to fix a whole tree without touching the wrong type.
  • If a web host support article tells you to chmod 777, treat it as a diagnostic step rather than a fix — the real problem is usually file ownership, corrected with chown.

Answers to common questions

What does chmod 755 mean?
Each digit is a permission total for one audience: owner, then group, then everyone else. 7 is read (4) + write (2) + execute (1), and 5 is read (4) + execute (1). So 755 means the owner can read, write and execute, while group and other can read and execute but not modify.
Why is 777 considered dangerous?
777 grants write and execute to every user on the system, so any account — including one an attacker has compromised — can replace the file's contents. Web hosts frequently flag it. Files almost always want 644 and directories 755.
Why do directories need the execute bit?
On a directory, execute means 'may traverse into it'. Without it you cannot cd into the directory or read files inside even if you have read permission, which is why directories use 755 where files use 644.
What is the difference between numeric and symbolic chmod?
They set the same thing in different notation. Numeric (chmod 644) replaces all permissions at once. Symbolic (chmod u+x) adjusts one part relative to what is already set, which is safer when you only want to add or remove a single bit.

Further reading

Looking for something else? Browse all developer tools or see every tool.