Chmod Calculator

Calculate Unix file permissions: convert between octal (755), symbolic (rwxr-xr-x), and individual checkboxes. Includes setuid/setgid/sticky bits.

1.0.0
Version
Auth
Batch

About Chmod Calculator

The classic "do I want 755 or 644 here?" moment — you're SSHed onto a server, about to run chmod, and you need to remember whether 755 means owner-everything-others-execute or owner-write-everyone-read. Most online calculators give one direction (numeric to letters or vice versa), force a page refresh between conversions, or hide setuid and sticky behind a paywall.

This chmod calculator wires three formats together — octal (0755), symbolic (rwxr-xr-x) and a 3×3 checkbox matrix — so editing any one updates the other two in real time. Setuid (4000), setgid (2000) and the sticky bit (1000) are first-class: tick a box and the symbolic notation properly switches to s/S for setuid/setgid or t/T for sticky, matching how ls -l actually prints them. A copy-ready chmod command and a find . -perm companion are generated below, plus a plain-English explanation of who can do what.

Use it to decode an unfamiliar 4755 you see on /usr/bin/passwd, double-check before tightening an SSH private key to 600, audit why a deploy script fails when the binary is 644, or memorise the eight common presets (644, 755, 600, 700, 666, 777, 4755, 1777) by clicking through them. Everything is bitwise math in JavaScript — no network call, no signup, no telemetry.

Chmod Calculator Use Cases

  • Sysadmins decoding an unfamiliar 4755 they see on a system binary
  • Tightening an SSH private key to 600 before sshd complains about loose modes
  • Debugging a deploy script that fails because the binary was uploaded as 644
  • Onboarding juniors who need to memorise the common modes (644, 755, 600)
  • Translating symbolic notation back to octal when reading ls -l output
  • Sanity-checking before chmod-ing a directory tree on a shared server

Chmod Calculator Features

  • Octal (0755), symbolic (rwxr-xr-x) and a 3×3 checkbox matrix all linked — edit any one and the other two update instantly
  • Setuid (4000), setgid (2000) and sticky (1000) bits with proper s/S/t/T symbolic encoding for ls -l parity
  • Bidirectional symbolic parsing — paste a 9 or 10-character rwxr-x--- back in (file-type prefix stripped) and matrix plus octal sync
  • Copy-ready chmod NNN file and find . -type f -perm NNN commands generated below, plus plain-English access description
  • Eight presets — 644, 755, 600, 700, 666, 777, 4755 (setuid), 1777 (sticky) — one-click apply for common modes
  • All bitwise math runs in your browser as pure JavaScript — no upload, no signup, no telemetry, works offline

How to Use Chmod Calculator

Choose an input format

Type an octal value (3 or 4 digits like 644 or 4755) into the Octal box, or a symbolic string like rwxr-xr-x into Symbolic. Or tick the read/write/execute boxes for Owner, Group and Others in the matrix below. All three stay in sync.

Add special bits if needed

Tick setuid for sudo-style executables that run as the owner, setgid for inherited group ownership in directories, or sticky for /tmp-style delete protection. The symbolic notation switches to s/S/t/T automatically to match ls -l output.

Copy the chmod command

Below the matrix, the chmod NNN file and find . -type f -perm NNN strings update in real time. Click the Copy button next to either one to grab it for your terminal or a shell script you're writing.

Or start from a preset

Eight common presets sit at the bottom — 644 for normal files, 755 for executables, 600 for SSH keys, 4755 for setuid binaries, 1777 for sticky directories like /tmp. Click any one to load it, then refine the bits as needed.

Chmod Calculator FAQ

No. The whole calculator is pure JavaScript running in the page — every conversion is bitwise math on three booleans per role. Nothing is uploaded, no network call is made, no telemetry is sent and there's no signup or cookie. You can disconnect from the internet after the page loads and it will keep working — useful when planning permissions on an air-gapped or restricted machine.

Octal: 3 digits (e.g. 755) or 4 digits where the leading digit is the special-bits sum (4 setuid + 2 setgid + 1 sticky). Symbolic: 9 characters (rwxr-xr-x) or 10 characters with a leading file-type marker like - or d, exactly as ls -l prints. Invalid input is silently ignored — the matrix only updates when an input parses cleanly.

Yes. When setuid is on but execute is off the calculator outputs capital S; when both are on it outputs lowercase s. Same logic for setgid (S/s in the group execute slot) and sticky (T/t in the others execute slot). This matches GNU coreutils and BSD ls -l exactly, so you can round-trip a permission string from ls -l output back into the matrix without losing the special bits.

Most competitors offer two formats — octal versus matrix, or octal versus symbolic — and disable special bits behind a pro tier. This one wires three together (octal, symbolic and the 3×3 matrix) and parses symbolic strings back into the matrix, so you can paste an ls -l line directly. Setuid, setgid and sticky are all first-class, and the find -perm command is generated alongside chmod for shell-script use.

Each of read, write and execute is a power of two: r=4, w=2, x=1. Add them per role to get one octal digit per role — owner, group, others — for a 3-digit total (e.g. rwxr-x--- = 7,5,0 = 750). The optional fourth digit at the front is setuid (4) + setgid (2) + sticky (1), so 4755 means setuid plus rwx for owner, r-x for group and r-x for others.

644 (rw-r--r--) is the default for regular files — owner edits, everyone reads. 755 (rwxr-xr-x) is the default for executables and directories — owner full, everyone can read and run or enter. 600 (rw-------) is for sensitive owner-only files like SSH private keys, where sshd refuses to use a key with looser permissions. Avoid 666 and 777 on production servers — they're world-writable.

Zero uploads. Everything runs in your browser — bitwise math only.

Octal

3 or 4 digits. Leading digit is special bits (setuid/setgid/sticky).

Symbolic

9 or 10 chars. Optional leading file-type character (-, d).

Permission Matrix

Read (r)Write (w)Execute (x)
Owner
Group
Others

Copy Commands

chmod 644 file
find . -type f -perm 644

Common Presets

Chmod Calculator Tutorial

Understanding Chmod

Unix permissions have 9 primary bits — 3 for each of owner, group, and others. Each trio is (read, write, execute).

Octal math: r=4, w=2, x=1. So rwx = 7, rw- = 6, r-x = 5. 755 = owner full, group+others read+execute.

Special Bits (the leading digit)

  • 4 (setuid) — when executed, runs with the owner's UID. How sudo and passwd work.
  • 2 (setgid) — on a dir, new files inherit the dir's group. On a binary, runs with group's privileges.
  • 1 (sticky) — on a dir, only the file owner (or root) can delete their own files. That's how /tmp is safe.

Good Defaults

  • Regular file: 644 (owner can edit, others read)
  • Script or binary: 755 (owner edits, everyone can run)
  • Directory: 755 or 775
  • SSH private key: 600 — sshd refuses keys with looser permissions
  • SSH public key or authorized_keys: 644
  • .env config with secrets: 600 owned by the app user

Things to Avoid

  • chmod 777 — never do this on a production server. Use proper ownership and ACLs instead.
  • chmod -R on a Git repo — messes up .git/hooks permissions
  • Setuid bit on a shell script — ignored by Linux for security