01What is chmod Calculator?
Unix permissions come in two spellings, and you usually need the one you don't have. A Dockerfile says 750, ls -l shows -rwxr-x---, and a colleague wants to know whether the group can write. This calculator converts between the numeric (octal) form and the symbolic form so you can stop counting bits on your fingers. Each of owner, group and others gets three bits: read is 4, write is 2 and execute is 1. Add them up per class and you get one octal digit each, so rwx is 7 and r-x is 5. That's the scheme described in the POSIX chmod specification and the GNU coreutils manual. You can work in either direction. Click the Read, Write and Execute buttons for Owner, Group and Others, or type into Numeric Value. The field accepts three digits like 644 or four digits like 0755 or 4755, and ignores anything that isn't valid octal. Everything updates as you go: the numeric value, the nine-character permission string, a chmod command in numeric form, and the same change in symbolic form, like chmod u=rwx,g=rx,o=rx. The optional leading digit holds three special bits, each with its own checkbox: setuid (4), setgid (2) and sticky (1). They show up the way ls prints them, as s or t in the execute slot when execute is set, and as a capital S or T when it isn't. The symbolic command appends u+s, g+s or +t. A worked example: type 2775. The string reads -rwxrwsr-x, the numeric command is chmod 2775 followed by your filename, and the symbolic one is chmod u=rwx,g=rwx,o=rx,g+s. That's the usual setup for a shared group directory where new files should keep the directory's group. Presets cover 755, 644, 777, 600, 400 and 664, plus 1777 for a /tmp-style shared directory and 2775 for a group-shared one. Put a name in Filename (for command) and it gets quoted for a POSIX shell when it contains spaces, quotes or other special characters. A few limits to keep in mind. The tool only builds commands. It never touches a file, so run them yourself. Typing 0750 gives chmod 750, which on GNU systems keeps an existing setgid bit on a directory. The leading type character in the string is always a dash, as for a regular file, and there's no umask or recursive -R option.
Developers and sysadmins who write chmod lines in Dockerfiles, deploy scripts or CI jobs and want to check what a mode really grants before running it. The tool runs entirely in your browser, so your data never leaves your device.
02How to use chmod Calculator
- Pick one of the Common Presets, or type a mode like 644 or 2775 into Numeric Value.
- Fine-tune with the Read, Write and Execute buttons for Owner, Group and Others.
- Tick setuid, setgid or the sticky bit under Special bits (leading octal digit) if you need one.
- Enter the target in Filename (for command) so the commands use the right name.
- Copy the Numeric, Symbolic or Command output and run the command in your terminal.
03Worked examples
- Input:
755, filename deploy.sh - Result:
-rwxr-xr-x chmod 755 deploy.sh chmod u=rwx,g=rx,o=rx deploy.sh - The usual mode for scripts and directories.
- Input:
640, filename config.yml - Result:
-rw-r----- chmod u=rw,g=r,o= config.yml - Group can read, others get nothing. o= with no letters clears all bits for others.
- Input:
2775, filename shared - Result:
-rwxrwsr-x chmod u=rwx,g=rwx,o=rx,g+s shared - setgid shows as a lowercase s in the group slot because group execute is set.
- Input:
4644 - Result:
-rwSr--r-- chmod u=rw,g=r,o=r,u+s filename - setuid without owner execute shows as a capital S.
- Input:
1777, filename /tmp - Result:
-rwxrwxrwt chmod u=rwx,g=rwx,o=rwx,+t /tmp - The sticky bit, as on /tmp.
- Input:
600, filename it's key.pem - Result:
chmod 600 'it'\''s key.pem' - Names with spaces or quotes are wrapped in single quotes, with embedded quotes escaped for a POSIX shell.
04Common use cases
- Making a deploy script executable with 755 before committing it, and checking what that grants to other users
- Fixing an SSH 'UNPROTECTED PRIVATE KEY FILE' warning by confirming 600 means owner read and write only
- Decoding a RUN chmod 2775 line in a Dockerfile to see that it sets setgid on a shared directory
- Writing a config file mode like 640 so the app's group can read secrets but others can't
- Spotting a capital S in ls -l output and understanding that setuid is set without execute
- Translating a numeric mode into u=,g=,o= form for an Ansible task or a teammate who prefers symbolic chmod
05Tips
- OpenSSH refuses a private key that group or others can read. Both 600 and 400 work.
- On Linux, GNU chmod keeps an existing setuid or setgid bit on a directory when you give a plain mode like 755. Use 00755 or the symbolic g-s form to clear it.
- A capital S or T in ls -l means the special bit is set but execute isn't. On a file that's usually a mistake.
- Directories need execute to be entered. A 644 directory lets people list names but not open anything inside it.
- Linux ignores setuid on shell scripts, so 4755 on a .sh file won't run it as the owner.
06Related concepts
File permissions, Sticky bit, SUID/SGID, umask.
Frequently Asked Questions
What is chmod Calculator?
chmod Calculator is a free, browser-based developer tool on AIDToolStack. Visual Unix file permission calculator with numeric, symbolic, and command output It requires no installation or sign-up and works entirely in your browser.
Is chmod Calculator free to use?
Yes. No sign-up, no fees and no usage cap.
Does chmod Calculator store my data?
No. It runs in your browser; nothing is uploaded.