~/tools / chmod-calculator
// linux

Chmod Calculator

Tick the boxes, or type an octal mode (644, 2775) or a permission string (rwxr-x---, as printed by ls -l). Everything stays in sync.

● runs 100% in your browser — nothing is uploaded

Command

Reading permissions

Each class — owner (u), group (g), others (o) — gets three bits: read = 4, write = 2, execute = 1. Add them per class to get one octal digit: rwx = 7, r-x = 5, r-- = 4. So 755 is rwxr-xr-x.

Common modes

  • 644 rw-r--r-- — regular files, web content
  • 755 rwxr-xr-x — directories, scripts and binaries
  • 600 rw------- — private keys (~/.ssh/id_ed25519), credentials
  • 700 rwx------ — ~/.ssh directory
  • 1777 rwxrwxrwt — /tmp: anyone can write, only owners can delete
  • 2775 rwxrwsr-x — shared team directory: new files inherit the group

Special bits

setuid runs an executable with the owner's privileges (e.g. /usr/bin/passwd) — a classic privilege-escalation target, audit them with find / -perm -4000. setgid on a directory makes new files inherit its group. The sticky bit on a directory lets only a file's owner delete it. Avoid 777: world-writable files are almost always a mistake.