Chmod Calculator

Tick the permissions you want, or type 755 or rwxr-xr-x, and get the matching octal, symbolic notation and chmod command. Covers setuid, setgid and the sticky bit.

Read Write Execute Octal
owner7
group5
others5
Special0
Common modes
Octal
755
Symbolic
rwxr-xr-x
$chmod 755 file
$chmod u=rwx,g=rx,o=rx file
  • Owner: read, write, execute
  • Group: read, execute
  • Others: read, execute

How the numbers add up

Read is 4, write is 2, execute is 1. Add them for each of owner, group and others: rwx = 7, r-x = 5, r-- = 4. So 755 is rwx for the owner and r-x for everyone else.

Directories are different

On a directory, read lists its contents, write creates or deletes files inside it, and execute lets you cd into it. A directory usually needs x wherever it has r, which is why folders are 755 and files 644.

SSH keys and secrets

SSH refuses keys that others can read. Use chmod 700 ~/.ssh and chmod 600 ~/.ssh/id_ed25519; AWS .pem files need 400 or 600.

Runs locally in your browser. Nothing you paste here is uploaded.