tool / devops

chmod Calculator

Click checkboxes, type an octal number, or enter symbolic notation — all three stay in sync. Security warnings for dangerous permissions.

← Back to tools
Read (r) Write (w) Execute (x)
Owner
Group
Other
Presets:

Octal Reference

BitsOctalMeaning
0000---
0011--x
0102-w-
0113-wx
1004r--
1015r-x
1106rw-
1117rwx

Three digits: Owner · Group · Other. Each digit is the sum of r=4, w=2, x=1.

Three Notations, One Permission

Unix permissions have three ways of saying the same thing, and the error message you're staring at rarely uses the one you think in. ls -l shows rwxr-xr-x, the fix you found on Stack Overflow says chmod 755, and your head works in "owner can write, everyone can read". This calculator keeps all three in sync: tick a checkbox and the octal and symbolic fields update, type 640 into the octal field and the grid follows. Once it looks right, the chmod command at the bottom is ready to copy — just swap <file> for your actual path.

Reading the Numbers

Each digit is a sum: read is 4, write is 2, execute is 1. So 7 means all three, 6 means read plus write, 5 means read plus execute. The three digits apply to the file's owner, its group, and everyone else, in that order. That's the whole system — the reference table on the right lists all eight combinations, and the presets cover the values you'll actually type in practice.

Common Permissions

  • 644 — files: readable by all, writable by owner only.
  • 755 — directories and executables: readable and executable by all, writable by owner.
  • 600 — private key files: only the owner can read or write.
  • 400 — read-only for owner, nothing for anyone else.

Security Notes

  • 777 is almost always wrong on production systems — any user can modify the file.
  • 666 lets anyone write to the file without needing execute permission.
  • SSH private keys must be 600 or SSH will refuse to use them.

Frequently Asked Questions

Why does SSH complain about my key permissions?

SSH refuses private keys that other users could read. Set the key to 600 (the preset is right there) and the "permissions are too open" error goes away.

Why can't I cd into a directory I can read?

For directories, execute means "enter". Read lets you list the names inside, but without execute you can't cd in or open anything. That's why directories usually get 755 where files get 644.

Does this cover setuid, setgid, and the sticky bit?

No — this calculator handles the standard three-digit form. Those special bits add a fourth leading digit (like chmod 4755) and deserve care; if you're reaching for them, read up first.

What's the difference between chmod and chown?

chmod changes what the owner, group, and others may do. chown changes who the owner and group actually are. When chmod doesn't fix a "permission denied", check ownership next — it's often the real culprit.

// huntermussel

Automating server provisioning and security hardening?

HunterMussel builds Infrastructure as Code pipelines that enforce file permissions, OS hardening, and security baselines automatically across all environments.

Explore CI/CD & DevOps Engineering →

Advertisement · Publicidade