chmod Calculator
Tick read, write, and execute for owner, group, and other, add the setuid, setgid, or sticky bit when you need it, and get the octal value, the symbolic string, and a ready-to-copy chmod command.
- Free, no account
- No watermark
- No usage limit
About the chmod Calculator
Most chmod calculators quietly stop at three digits. Paste in 4755 and they hand back 755, the setuid bit gone, and the symbolic string reads rwxr-xr-x when the correct answer is rwsr-xr-x. That missing s is the whole reason the value exists, and this calculator keeps it.
Tick read, write, and execute for owner, group, and other, flip on setuid, setgid, or sticky when you need one, and you get the octal value like 4755, the correct symbolic string rwsr-xr-x, and a chmod command you can copy straight into a terminal. Type an octal number instead, three digits or four, and the boxes rearrange to match, so it works in both directions.
Everything runs in your browser. Nothing you type is sent anywhere and there's no sign-up. It never touches your real files, it just builds the command text for you to run, so you can see exactly what chmod 2770 does before you fire it at a shared folder.
How to use
- Check the boxes. Three rows, Owner, Group, Other. Three columns, Read, Write, Execute. Tick a box to grant that permission. The octal digit for each row shows on the right so you can watch how it adds up.
- Add a special bit if you need one. The setuid, setgid, and sticky checkboxes sit just below the grid. Most files never use these, so leave them off unless you have a reason.
- Read the live output. The Octal field and the Symbolic field update as you click. Turn on a special bit and the octal grows a leading digit (
755becomes4755) and the symbolic string swaps ansortinto the right slot. - Or type an octal value. Drop
1777into the box and the grid plus the special checkboxes rearrange to match. Three or four digits both work. - Grab a preset. The buttons cover the everyday values plus the three special ones,
4755,2775,1777, in one click. - Copy the command. You get both forms, numeric (
chmod 4755 filename) and symbolic (chmod u=rwx,g=rx,o=rx,u+s filename). Copy whichever you prefer, swapfilenamefor your path, and run it.
Type something invalid, a 9 or a letter, and the box flags it instead of producing garbage.
What read, write, and execute actually do
The same permission means different things on a file versus a directory.
On a file, read lets you open it, write lets you change it, and execute lets you run it as a program. A shell script needs that execute bit or ./deploy.sh throws "Permission denied," even when you can read every line of it.
On a directory the meanings shift. Read lets you list what's inside. Write lets you create, delete, and rename files in it, and note that deleting a file needs write on the directory, not on the file, which surprises people constantly. Execute lets you enter the directory and reach files by name.
A directory is basically unusable without execute, which is why folders end up on 755 while a plain file, needing no execute at all, sits on 644.
The special bits: setuid, setgid, and sticky
Beyond the nine read/write/execute bits sit three more, and they're the ones most calculators drop. Each has a value. Setuid is 4, setgid is 2, sticky is 1, and together they form a fourth octal digit that goes out in front, giving you 4755, 2775, or 1777.
Setuid makes a file run as its owner rather than whoever launched it. That's how passwd lets an ordinary user update the root-owned password file. In ls -l it shows up as an s in the owner's execute slot, -rwsr-xr-x.
Setgid does the same trick with the group. On a plain file it means "run as the file's group." On a directory it's more useful. New files created inside inherit the directory's group instead of the creator's, which is exactly what you want for a shared project folder. 2775 on a team directory is a common setup.
Sticky is for directories. With it set, only a file's owner can delete or rename that file, even when everyone can write to the folder. This is the trick that keeps /tmp safe. Everybody can create files there (1777), while removing a file stays limited to its owner.
There's a small detail this calculator nails and the cheaper ones botch. The special bit reuses the execute slot in the symbolic string, so the letter changes depending on whether execute is also on. Setuid with execute is a lowercase s. Setuid without execute is an uppercase S. Sticky follows the same rule, t when the other-execute bit is on, T when it isn't. Uppercase is a signal that the special bit is set but the underlying execute isn't, which is almost always a mistake worth catching. Toggle the boxes and watch the case flip.
The values you'll reach for most
A handful of values cover nearly everything.
644for regular files. Owner edits, everyone reads, nobody runs it.755for directories and scripts. Owner does everything, others read and traverse but can't change.600for private files. SSH keys,.envfiles, anything with a secret inside. Owner only.700for a private directory like~/.ssh.400is read-only for the owner. OpenSSH refuses a private key others can read, so keys sit at400or600.
chmod 777 hands read, write, and execute to every account on the machine, which on a shared host is a genuine hole, and it doesn't even fix the SSH-key problem people reach for it to solve, since SSH rejects keys that are too open. When something breaks, the real fix is almost always 755, 644, and 600, not a blanket 777.
Frequently asked questions
What does chmod 4755 mean?
The 4 is the setuid bit, and 755 is owner rwx, group r-x, other r-x. So the file runs with its owner's privileges no matter who starts it, which is why you see it on tools like ping and passwd, and it is worth handling carefully. A setuid-root program with a bug is a classic way for a local user to become root, so keep the number of setuid binaries on a box small and know why each one exists.
What's the difference between setgid on a file and on a directory?
On a file, setgid means the program runs as the file's group, the group-level version of setuid. On a directory it does something else: every new file or subfolder created inside picks up the directory's group instead of the creator's default. Put 2775 on a shared folder and everyone's contributions stay in the same group automatically, so teammates read each other's files without you chasing chown afterward.
Why does my symbolic string show a capital S or T?
Because the special bit is set but the matching execute bit is not. A lowercase s means setuid plus execute, an uppercase S means setuid with execute switched off. Same story for sticky, lowercase t versus uppercase T. A capital letter usually means you set the special bit but forgot the execute underneath it, and the file often won't behave the way you expected. If you see one, check whether you meant to leave execute on.
When would I actually reach for the sticky bit?
Any directory where lots of people can write but you don't want them deleting each other's files. /tmp is the textbook case at 1777, and shared upload or drop folders are the same idea. Without it, write access on the folder lets anyone remove anyone else's files, since deletion is a property of the directory. With it, only each file's owner can remove their own.
Why do I get "Operation not permitted" when I run chmod?
Because you're not the file's owner and you're not root. Only the owner or the superuser can change a file's permissions. Being able to read or even write the contents does not grant the right to re-permission it. Check who owns it with ls -l, then use sudo or fix ownership first with chown.
Does chmod work on Windows?
Not natively. Windows uses its own permission system, not Unix read/write/execute bits. You will meet chmod inside WSL, Git Bash, or Cygwin, but there's a catch: on a drive mounted from Windows the bits are often faked or ignored, so chmod 600 on a file in C:\ may not actually stick. Keep anything that needs strict permissions, like an SSH key, inside the Linux filesystem.
Is anything I type here sent to a server?
No. The calculator runs entirely in your browser. Your choices, the octal values, and the generated commands never leave your device, and nothing is stored or logged. It never touches your real files either, so you can experiment with 2770 or 4755 freely and close the tab with nothing left behind.