How to use the Chmod Calculator
- Tick the permissions in the grid, click a preset, or type a value like
644,-rw-r--r--oru=rw,go=r. - Read the numeric value, the
ls -lstring and the plain-English table. - Copy the numeric or symbolic
chmodcommand; add-Rfor a whole folder (carefully).
How the numbers work
Each digit is the sum of read = 4, write = 2 and execute = 1 for owner, group and others. 7 = 4+2+1 (rwx), 5 = 4+1 (r-x), 4 (r--). An optional leading digit sets the special bits: setuid = 4, setgid = 2, sticky = 1.
| Value | Symbolic | Typical use |
|---|---|---|
644 | rw-r--r-- | Regular files: HTML, CSS, images, config |
755 | rwxr-xr-x | Folders and executable scripts |
600 | rw------- | Secrets: .env, SSH private keys, ~/.ssh/config |
700 | rwx------ | ~/.ssh folder, private scripts |
400 | r-------- | Read-only keys (AWS .pem files) |
1777 | rwxrwxrwt | /tmp — everyone writes, only owners delete |
777 | rwxrwxrwx | Almost never — anyone can modify the file |
Execute on folders
For a directory, “execute” means enter it and access files inside. A folder with 644 can be listed but not opened — that’s why web roots need 755 folders and 644 files: find . -type d -exec chmod 755 {} + and find . -type f -exec chmod 644 {} +.
Special bits
- setuid (4xxx) — an executable runs with the file owner’s rights (e.g.
passwd). - setgid (2xxx) — on folders, new files inherit the folder’s group; handy for shared team folders.
- sticky (1xxx) — on folders, only a file’s owner can delete it.
Deploying with Docker or CI? See the Docker Compose Generator and GitHub Actions Generator; for web servers the Nginx Config Generator.
Tools that pair well with the Chmod Calculator
- Number Base Converter — Type a number in any base and see it in all the others instantly.
- .env File Validator — Paste a .env file to find invalid keys, duplicates, empty values and quoting mistakes, compare it with .env.example to spot missing variables, and generate a safe example file.
- MIME Type Lookup — Search 200+ file extensions and MIME types — .webp, .woff2, .webmanifest, application/wasm … — or drop a file to detect its real type from its first bytes.
- Git Command Generator — Pick a task like “undo the last commit but keep my changes” or “rename a branch on GitHub”, fill in your branch names and get the exact Git commands — each line explained, risky steps flagged.