Chmod calculator
MDV ToolsTick the bits or type the number, and read what the mode actually allows.
| Who | Read | Write | Execute | Special |
|---|---|---|---|---|
| Owner | ||||
| Group | ||||
| Others |
- Symbolic
- As a file
- As a directory
- chmod
- Owner
- Group
- Others
How this works
A mode is twelve bits written as four octal digits. The last three digits are owner, group and
others, each holding read 4, write 2 and execute 1 added together, which is why 6 is read and write
and 7 is everything. The digit in front carries the three special bits: setuid 4, setgid 2 and the
sticky bit 1. chmod 644 and chmod 0644 mean the same thing; a number with
a digit above 7 is not octal and is refused rather than guessed at.
What the bits do depends on what they are set on. On a file, execute means the kernel may run it;
on a directory it means you may enter it and reach what is inside, so a directory with read but no
execute lists names you cannot open. Setuid on an executable file runs it as the file's owner —
the classic hole, which is why the page marks it. Setuid on a directory does nothing on Linux.
Setgid on a directory makes new entries inherit the directory's group, which is the usual reason
to set it. The sticky bit on a shared directory such as /tmp stops one user deleting
another's files even when everyone may write there; on a file it is ignored by current kernels.
When a special bit is set on a class that has no execute bit, the symbolic string shows the capital
letter — S or T — and that is what ls prints.
The page states modes; it does not reason about your system. A real result also depends on the
owner and group of the file, the mount options, the umask that was in force when it was created,
and on any ACL or SELinux label, none of which a page can see. The symbolic chmod line
is the u=…,g=…,o=… form, which sets exactly these bits rather than adding to what is
already there.
Nothing is uploaded and nothing you tick is stored; the Dark button keeps its setting in this browser's local storage.