chmod permission calculator
Type a file mode as octal (4755), as ls shows it (-rwsr-xr-x) or as chmod clauses on a base (g+s,o-rwx) and read it every other way: the bits, who may do what, what setuid, setgid and the sticky bit mean for a file or a directory, the commands that reach it, the umask that would create it, and a trace of each clause. From POSIX.1-2024 chmod and ls and coreutils 9.11 chmod(1); nothing leaves the browser.
Operations & FieldcraftOctal (one to five digits), an ls string (nine characters, or ten with the type letter), or chmod clauses separated by commas. A clause with no class (+x) is applied under the umask, as chmod does.
What the clauses are applied to. Blank means 644 for a file and 755 for a directory. On a directory, a numeric mode of up to four digits keeps its set-user-ID and set-group-ID bits, as GNU chmod does.
Bits set here are left alone by + and - when no class is named. Blank means 022.
Read as chmod clauses on the base. · binary 0101 1110 1000 · decimal 1512
The twelve bits (click one to flip it)
| Class | read | write | execute | Digit | Reading |
|---|---|---|---|---|---|
| Owner | 7 | Owner can list its entries, create and remove entries and enter it and reach entries by name. | |||
| Group | 5 | Group can list its entries and enter it and reach entries by name. | |||
| Others | 0 | Others: nothing. |
Worth a second look
- noteset-group-ID on a directory: new entries inherit the directory's group, the usual setting for a shared project directory.
Commands that reach this mode
- Absolute, octal
chmod 2750 <path> - Absolute, symbolic
chmod u=rwx,g=rxs,o= <path> - From the base, minimal
chmod g+s,o-rx <path>
No umask creates this mode: the special bits never come from a umask.
Clause by clause, from 0755 under umask 022
| Clause | Classes | Op | Perm | Mode after | Notes |
|---|---|---|---|---|---|
| g+s | g | + | s | 2755 | |
| o-rwx | o | - | rwx | 2750 |
The calculator knows the mode bits, not the file system: it cannot see ownership, access control lists, capabilities, mount options or the mandatory access control that may override these bits. The GNU-specific behaviours (a directory keeping setuid and setgid under a numeric mode; =755, +x and -w with a number) are modelled as chmod(1) from coreutils 9.11 describes them; other implementations may differ.