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
Tick the permissions you want for the owner — the user account that owns the file.
- 2
Do the same for the group, then for other, which means every remaining user on the system.
- 3
Enter the file or directory path so the generated command is ready to run as-is.
- 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.