Chmod Calculator
- Octal (4-digit)
- 0644
- Binary
- 110 100 100
Owner: Read, Write
Group: Read
Others: Read
Note: symbolic operations apply with no umask (a missing class defaults to a), and X adds execute only when any execute bit is already set. There is no filesystem context in the browser.
How chmod permission numbers work
A Unix permission mode has 12 bits: read, write and execute for the owner, the group and others, plus three special bits (setuid, setgid, sticky). Each octal digit is the sum of r = 4, w = 2 and x = 1, so 7 = rwx, 6 = rw-, 5 = r-x and 4 = r--, and 755 means rwx for the owner and r-x for group and others. Edit the checkbox matrix, the octal value (755 or 4755), the ls -l string (rwxr-xr-x) or a symbolic operation, and the binary value, the chmod command and the plain-English description update with it.
setuid, setgid and the sticky bit
The high nibble holds three special bits. setuid (4000) runs an executable with the owner identity — the classic example is /usr/bin/passwd at 4755. setgid (2000) makes new files in a directory inherit its group, useful for shared folders at 2775. The sticky bit (1000) on a directory like /tmp at 1777 lets anyone create files but only the owner delete their own.
Symbolic operations (u+x, go-w, a=rx)
Besides absolute modes, chmod accepts symbolic operations: a class (u, g, o, a), an operator (+, -, =) and permissions (r, w, x, X, s, t). This tool parses comma-separated clauses such as u+x,go-w or u=rwx,go=rx and applies them to the current mode from left to right. The capital X adds execute only when an execute bit is already present.
Capital S and T in ls -l output
In an ls -l listing, a lowercase s or t means the special bit is set and the matching execute bit is also present, so the bit works. A capital S or T means the special bit is set but the execute bit is missing, so the special bit has no effect. 4655 renders as rwSr-xr-x and 1666 as rw-rw-rwT. The calculator shows a warning whenever a special bit is ineffective.
How to use the Chmod Calculator
- Set a permission: Toggle the read/write/execute checkboxes, pick a preset like 755, or type an octal value such as 644.
- Add special bits: Flip setuid, setgid or the sticky bit, or paste a symbolic string like rwsr-xr-x to set them from ls -l output.
- Apply an operation: Type a symbolic operation such as u+x or go-w in the operation field and press Enter to transform the current mode.
- Copy the command: Read the synced octal, symbolic, binary and description, then copy a ready-to-run chmod command.
FAQ
What is the difference between 3-digit and 4-digit octal?
The 3-digit form (755) covers read/write/execute for owner, group and others. The 4-digit form (4755) adds a leading digit for the special bits: 4 = setuid, 2 = setgid, 1 = sticky, summed together. When no special bit is set the leading digit is 0 and is usually omitted.
Why does ls show a capital S or T?
A capital letter means the special bit is set but the corresponding execute bit is not. setuid without owner execute shows S, setgid without group execute shows S, and the sticky bit without other execute shows T. The bit is recorded but has no practical effect, which is why this tool warns about it.
What does the symbolic operation field do?
It applies a chmod symbolic change to the current mode. Type something like u+x to add owner execute, go-w to remove write from group and others, or u=rwx,go=rx to assign exact permissions. Press Enter or Apply and every other view updates from the new mode.
Does this calculator use my umask?
No. A browser has no filesystem context, so symbolic operations apply with no umask: an unspecified class defaults to a (all), and X adds execute only when an execute bit is already set. This keeps results predictable and matches what chmod would do given the same explicit input.
What do chmod 755 and chmod 644 mean?
755 is rwxr-xr-x: the owner can read, write and execute; group and others can read and execute. It is the usual mode for directories and scripts. 644 is rw-r--r--: the owner can read and write, everyone else can only read. It is the usual mode for regular files such as HTML, images and config files. On a directory, x controls whether you can enter it, so directories need 755 or 700 rather than 644. For SSH private keys use 600.
Is chmod 777 safe?
Rarely. 777 (rwxrwxrwx) lets every user on the system modify or replace the file, and the calculator shows a world-writable warning whenever others have write permission. For a directory shared by a team, 775 or 2775 with a common group is usually enough; for a /tmp-style directory, 1777 adds the sticky bit so users cannot delete each other's files.
What does chmod +x do?
It adds execute permission so a script or program can be run, for example as ./script.sh. With no class letter, chmod applies the change to the owner, group and others, except for bits set in your umask; with the common umask 022, a 644 file becomes 755 (rwxr-xr-x). Use u+x to add execute for the owner only. Typing +x in the operation field here adds it for all three classes, since this calculator ignores umask.
Related tools
Related articles
- A Capital S in ls -l Means Your setuid Bit Is Doing Nothing
chmod 4655 shows -rwSr-xr-x. The capital S means setuid is set but inert because the owner lacks execute. How S/T case works, plus symbolic modes like u+x,go-w.