Chmod Permission Calculator
Tick the read, write, and execute boxes for owner, group, and others to get the octal (e.g. 755) and symbolic (e.g. rwxr-xr-x) permissions, plus a ready-to-run chmod command. Supports setuid, setgid, and the sticky bit.
| Read (4) | Write (2) | Execute (1) | |
|---|---|---|---|
| Owner | |||
| Group | |||
| Others |
Understanding Unix File Permissions and chmod
Every file and directory on a Unix-like system (Linux, macOS, BSD) has permissions that control who can read, write, and execute it. The chmod ("change mode") command sets those permissions, and it accepts two notations: octal (numbers like 755) and symbolic (letters like rwxr-xr-x). This calculator converts between them instantly so you never have to do the math in your head.
The Three Permission Types and Three Classes
Permissions apply to three classes of user — the file's owner, its group, and others (everyone else) — and each class can have three permissions:
- Read (r = 4) — view the file's contents, or list a directory.
- Write (w = 2) — modify the file, or create/delete files in a directory.
- Execute (x = 1) — run the file as a program, or enter (cd into) a directory.
Add the values for each class to get its octal digit: read + write + execute = 4 + 2 + 1 = 7. So 755 means the owner has 7 (rwx), and group and others each have 5 (r-x).
Common Permission Sets
644(rw-r--r--) — typical for regular files: owner can edit, everyone can read.755(rwxr-xr-x) — typical for directories and scripts: owner full control, others can read/run.600(rw-------) — private files like SSH keys: only the owner can read or write.700(rwx------) — private directories: only the owner can access.777(rwxrwxrwx) — everyone can do everything. Almost always a security mistake — avoid it.
Special Permission Bits
A fourth, leading octal digit controls three special bits:
- setuid (4000) — a program runs with the file owner's privileges. Shown as
sin the owner's execute slot. - setgid (2000) — runs with the group's privileges, or (on a directory) new files inherit the directory's group. Shown as
sin the group slot. - sticky bit (1000) — on a directory (like
/tmp), only a file's owner can delete it. Shown astin the others slot.
A lowercase s/t means the execute bit is also set; an uppercase S/T means the special bit is set but execute is not.
Frequently Asked Questions
rwxr-xr-x. It's the standard for directories and executable scripts.rwxr-xr-x) into the Symbolic field and the octal appears instantly. Each group of three letters becomes one digit: r=4, w=2, x=1, added together./tmp, the sticky bit (1000) means only a file's owner — not everyone with write access — can rename or delete it. It shows as a t in the "others" execute position.