Chmod Calculator
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Choose the permission digit for each class of user to see the chmod number and its symbolic form.
Result
Octal mode for chmod
Owner (rwx)
- Group (rwx)
- Others (rwx)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Owner (user) permissions: choose one of the 8 options in the list.
- Group permissions: choose one of the 8 options in the list.
- Others permissions: choose one of the 8 options in the list.
- Read the result: Octal mode for chmod; the panel also shows Owner (rwx), Group (rwx) and Others (rwx).
How this calculator works
Each permission digit is the sum of read = 4, write = 2 and execute = 1, as defined for the mode bits S_IRUSR … S_IXOTH in POSIX (IEEE Std 1003.1, <sys/stat.h>). The three digits are owner, group and others, so chmod 640 gives rw- to the owner, r-- to the group and nothing to others.
A leading zero is not shown: a mode of 44 means 044 (no rights for the owner). Special bits (setuid 4000, setgid 2000, sticky 1000) are not covered here.
The formula
| Symbol | Meaning |
|---|---|
| Owner (user) permissions | |
| Group permissions | |
| Others permissions | |
| Octal mode for chmod |
Worked example
| Owner (user) permissions | 7 — rwx |
|---|---|
| Group permissions | 5 — r-x |
| Others permissions | 5 — r-x |
| Owner (rwx) | rwx |
|---|---|
| Group (rwx) | r-x |
| Others (rwx) | r-x |
Octal mode for chmod 755
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
What does chmod 755 mean?
Owner can read, write and execute (7); group and others can read and execute (5): rwxr-xr-x.
What does chmod 644 mean?
Owner can read and write (6); group and others can only read (4): rw-r--r--.
Why add 4, 2 and 1?
Each right is one bit: read is binary 100, write 010 and execute 001, so any mix has a unique sum from 0 to 7.