How this calculator works
- Step 1Addr 4, w 2, x 1One digit per class.
- Step 2Classesowner, group, othersLeft to right.
- Step 3Special4000, 2000, 1000set-user-ID, set-group-ID, sticky.
Each octal digit is a sum: 4 for read, 2 for write and 1 for execute. The three digits are the owner, the group and everyone else, in that order.
A fourth leading digit adds the special bits. In the symbolic form these show as s or S in place of the execute letter, and t or T for the sticky bit.
Worked example: 755
- Digit
read 4 + write 2 + execute 1
- Owner: 74 + 2 + 1rwx
- Group: 54 + 1r-x
- Others: 54 + 1r-x
- Symbolicrwxr-xr-x
Read the result
- 644rw-r--r--Ordinary files: owner edits, others read.
- 600rw-------Private files such as keys.
Special bits change the letters: 4755 is rwsr-xr-x and 1777 is rwxrwxrwt.
Assumptions and limits
- POSIX bitsAs defined for the chmod utility.
- DirectoriesExecute means permission to enter.
- No ACLsAccess control lists are separate.
- Capital S or TSpecial bit set without execute.
Related developer tools
File permissions are three octal digits, each made of three bits.
To work through the bits yourself, use the binary calculator. For other number bases, the hex calculator shows every base at once.
Common mistakes
Mistake: Using 777 to fix a permission error.
Instead: Give the least access that works, such as 755 or 644.
Mistake: Reading 750 as owner 7, others 5.
Instead: The middle digit is the group.
Checking the method
A separate script turns every mode into its ls-style string with Python’s stat.filemode and matches each golden value.
Read how we test our calculators, or browse more developer tools.