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
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