How to use the chmod calculator
- Choose Set permissions by: Checkboxes or Octal or symbolic value.
- With checkboxes, tick the boxes from Owner — read to Others — execute, plus setuid, setgid or Sticky bit if needed. The defaults give 755.
- With a value, type it into Value:
755,0644,4755,rwxr-xr-xor a full ls string such as-rw-r--r--. The leading file-type character is ignored. - Set File name for the command, then copy the octal, the symbolic string or the
chmodline.
What it does and when to use it
Unix permissions appear in two shapes. ls -l prints -rwxr-x---, but chmod, Dockerfiles, Ansible mode: and many deploy guides use numbers such as 0750. A wrong mode can leave a secret world-readable or make a script fail with “Permission denied”. This calculator turns either form into the other and shows each user class separately.
Typical cases: an SSH private key that must be 600, a deploy script that should run only for its owner and group, a shared upload folder where new files keep the group (setgid), or checking that nothing is world-writable. For other shell commands, see the Linux Commands Ref.
How it works
Permissions are 12 bits, as defined for chmod in POSIX. Each octal digit packs three bits:
r = 4 w = 2 x = 1
owner rwx = 4+2+1 = 7 group r-x = 4+0+1 = 5 others --- = 0
The special bits sit in front: setuid 4000, setgid 2000, sticky 1000. In the ls string they replace the execute letter of owner, group or others with s/S or t/T. The tool also prints the same mode as a symbolic chmod argument (u=…,g=…,o=…). It warns when others can write, and when setuid is set. It all runs in your browser and changes no files.
Worked examples
An SSH key. Value 600, file ~/.ssh/id_ed25519:
Octal: 600
Symbolic: rw-------
chmod 600 ~/.ssh/id_ed25519
OpenSSH refuses to use a private key that others can read.
Reading an ls line. Value -rwxr-x--- gives Octal: 750 and chmod u=rwx,g=rx,o= deploy.sh. The owner can edit and run, the group can run, others have no access.
A shared folder. Value 2775 gives Symbolic: rwxrwsr-x. The s in the group slot is setgid: on a directory, new files take the directory’s group, so a team can share it.
Limits and tips
- The
u=…,g=…,o=…form addssfor setuid or setgid and,+tfor the sticky bit, so 4755 givesu=rwxs,g=rx,o=rx. - A file name with spaces or shell characters is wrapped in single quotes in the commands.
- Your umask, ACLs (
setfacl) and file ownership also decide access; this tool does not see them. - To see why the digits work, try the bit patterns in Binary Arithmetic. After changing the execute bit on a tracked file, commit it like any change; the Git Cheatsheet lists the commands.
Frequently asked questions
What do 644 and 755 mean?
What does execute mean on a directory?
What is a four-digit mode such as 4755?
Why does ls show a capital S or T?
Does Git keep these permissions?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.