Chmod Calculator
Toggle permissions for owner, group, and others to instantly see the numeric (octal) code, symbolic notation, and the chmod command to run. No more memorizing permission numbers.
How Unix permissions work:
Every file and directory has three permission groups: owner, group, and others. Each group can have read (r=4), write (w=2), and execute (x=1) permissions. Add the values together to get the octal digit for each group.
Common permission sets:
- 755 -- owner can do everything, everyone else can read and execute. Standard for directories and scripts.
- 644 -- owner can read and write, everyone else can only read. Standard for regular files.
- 600 -- only the owner can read and write. Use for SSH keys and config files with passwords.
- 777 -- everyone can do everything. Almost always a bad idea in production.
- 400 -- owner can read only. Common for .pem certificate files.
The octal math:
- Read = 4
- Write = 2
- Execute = 1
- Read + Write = 6
- Read + Execute = 5
- Read + Write + Execute = 7