About this tool
On Linux, macOS and other Unix systems every file has three permission groups: for the owner, for the group and for everyone else. Each group can read (r), write (w) and execute (x). The chmod calculator translates between octal notation like 755 and symbolic notation like rwxr-xr-x – via checkboxes, typing or presets.
It also shows the special bits setuid, setgid and the sticky bit and builds ready-made chmod commands in both notations. Handy when setting up web servers, deploy scripts or SSH keys. For scheduled jobs use the Cron Expression Explainer tool, for network masks the IP Subnet Calculator.
How it works
- Enter a mode (e.g. 644 or rw-r--r--) or choose one of the common presets.
- Adjust the permissions with the checkboxes for owner, group and others.
- Set the special bits setuid, setgid or sticky bit if needed.
- Copy the chmod command or the notation you need.
Frequently asked questions
How does rwx become a number?
Each permission has a value: read 4, write 2, execute 1. The sum per group is one digit – rwx = 7, r-x = 5, r-- = 4. Owner, group and others together give e.g. 755.
Which permissions are common?
644 for regular files (only the owner can write), 755 for programs and directories, 600 for private files such as SSH keys and 700 for private directories. 777 gives everyone everything and is almost always a bad idea.
What are setuid, setgid and the sticky bit?
setuid runs a program with the permissions of its owner, setgid with those of its group; on directories, setgid makes new files inherit the group. The sticky bit on directories like /tmp means only owners can delete their files. They form a fourth, leading digit, e.g. 1777.
What does a capital S or T mean?
In ls -l output a lowercase s or t means the special bit and the execute permission are both set. A capital S or T means the special bit is set but the execute permission at that position is missing.