Chmod Calculator - Unix File Permissions, Octal & Symbolic
Chmod Calculator
Tick permissions, read the octal number and copy the chmod command
Three Views, Always in Sync
Change the checkboxes, the octal number or the rwx string and the others follow at once.
Ready-to-Run Command
Add a file name and copy the chmod command, with -R for folders. Names with spaces are quoted for you.
Symbolic Expressions
Try u+x, go-w or a=rx,u+w on the current permissions and see the result before you run it.
Full Privacy
Everything is calculated in your browser.
How Unix Permissions Work
Every file has three sets of permissions, for its owner, its group and everyone else, and each set can allow read (4), write (2) and execute (1). Add up the numbers for each set to get an octal digit: read and write is 6, read and execute is 5, all three is 7. So 755 means the owner can do everything while the group and others can read and run the file, which is shown symbolically as rwxr-xr-x.
A fourth, leading digit holds the special bits: setuid (4) makes a program run as its owner, setgid (2) as its group or makes new files in a folder inherit the group, and the sticky bit (1) on a shared folder such as /tmp lets only a file's owner delete it. Common choices are 644 for ordinary files, 755 for programs and folders, 600 for private keys and 1777 for shared temporary folders. Avoid 777, which lets anyone change the file.
Key Takeaways
- Presets: One click for 644, 755, 600, 700, 664, 775, 400, 777, 1777 and 4755.
- Special bits: Setuid, setgid and sticky, shown as s, S, t and T in the symbolic form.
- Checked against chmod: Expressions give the same result as the real chmod command (with a umask of 000 when no who is given).