← Back to DevKit

chmod Calculator

CHMOD CALC · DEV TOOLS

Convert rwx notation to octal and back across owner/group/other, with setuid/setgid/sticky explained — directory and file scenarios included.

Permission bits
Owner Group Other
Conversion
Octal Symbolic
r=4, w=2, x=1; each of owner/group/other sums into one octal digit. setuid (run as file owner), setgid (new files in the directory inherit its group), sticky (only the owner may delete, like /tmp). For directories x means enterable, for files executable — 755 fits directories and executables, 644 fits regular files.

>_ USAGE GUIDE

Octal chmod values are just three digit groups — owner, group, other — each summing r=4, w=2, x=1. Mental arithmetic like "which number is rw-r--r--?" is exactly what this tool removes: tick permission bits to read the number, or type the number to see the bits, with the meaning of every special bit spelled out as you go.

  1. Tick the bits: three checkboxes per segment; the octal value and symbolic string update live
  2. Type instead: enter 755 in the octal field or rwxr-xr-x in the symbolic field and the checkboxes sync automatically
  3. Use presets: one click fills the everyday values 755 / 644 / 600 / 777
  4. Copy the command: the result panel emits a ready-to-paste chmod 755 <path> line
  5. Read the special bits: ticking setuid, setgid or sticky shows an explanation of both its file and directory semantics

>_ FAQ

Q1 · Where should 755 and 644 be used?

755 (rwxr-xr-x) suits directories (x means enterable) and executables or scripts; 644 (rw-r--r--) suits regular files — the owner reads and writes, everyone else reads. A common web root is 755 for directories with 644 for files, and private key files should be tightened to 600.

Q2 · What do setuid, setgid and sticky do?

setuid (4000): the file executes as its owner (like passwd). setgid (2000): the file executes with the group identity, and on directories new files inherit the directory's group. sticky (1000): inside the directory only the file owner and root may delete — /tmp is the classic case. In the symbolic string they appear in the x position: lowercase s/t means the special bit and x are both on, uppercase S/T means the special bit is on without x — which is almost always a misconfiguration.

Q3 · When is the octal value three digits versus four?

The leading digit carries the special bits (setuid/setgid/sticky as 4/2/1). It is usually omitted, giving 755; once a special bit is set you must write all four digits, as in 4755. Note that chmod 755 leaves existing special bits untouched, while chmod 0755 clears them explicitly — a common cause of mystery s bits.

Q4 · Does the symbolic input accept s, S, t and T?

Yes. Strings like rwsr-xr-t (4755) or rwSr--r-- (setuid without owner x) parse into checkbox state, and malformed input produces a clear format message instead of a guessed result.

Q5 · What happens if I remove x from a directory?

A directory's x means "may enter and access entries". Without it, even with r you can only list file names but not stat or open anything inside; with x but no r, a known full path still works. When locking a directory down, consider all three segments together — the reason this tool lays them out side by side.

Embed code

Paste the code below into your page to embed this tool as an iframe (nav and footer auto-hidden).

Heightpx
This tool runs entirely in your browser — input never leaves your device. Press Ctrl K to switch tools anytime.