Advertisement

Chmod Calculator

Turn rwx checkboxes into octal chmod values and back. Toggle user, group and other permissions plus setuid, setgid and sticky bits, and get the numeric mode, symbolic string and a ready-to-paste chmod command.

Permission bits

Tick boxes or type an octal value, both stay in sync.

User
Group
Others
Special bits
Result

Symbolic: -

-

Replace <file> with your path and run in a terminal.

Advertisement

How chmod numbers work

Unix permissions are three rwx triples (read, write, execute) for user, group and others. Each triple is one octal digit: read=4, write=2, execute=1, so rwxr-xr-- is 4+2+1, 4+1, 4+0 = 754. Optional special bits sit in a leading fourth digit: setuid (4), setgid (2) and sticky (1).

Common modes

Common recipes: 644 (rw-r--r--) for files, 755 (rwxr-xr-x) for scripts and directories, 600 (rw-------) for private keys, and 1777 for world-writable temp dirs with the sticky bit. The symbolic column shows exactly what each digit means, so you can sanity-check before running chmod.

Chmod Calculator FAQs

How do I use this calculator?
Type the number (e.g. 755) into the octal box and the checkboxes update. Or tick the rwx boxes and watch the octal, symbolic and special-bit readouts update live. Both directions stay in sync.
What does chmod 644 mean?
644 gives rw-r--r--: the owner can read and write, everyone else can only read. It is the standard for web files, configs and documents that must not be executed.
What does chmod 755 mean?
755 gives rwxr-xr-x: everyone can read and execute, only the owner can write. Use it for scripts, binaries and directories, which need the execute bit to be entered.
What permissions should a private key have?
600 is rw-------, private to the owner. SSH keys, tokens and credential files should be 600 or 400 so no other user on the machine can read them.
What is the fourth digit for?
The leading digit holds setuid (4), setgid (2) and sticky (1). 4755 runs a file as its owner, 2755 runs it as its group, and 1777 on /tmp lets anyone write but only delete their own files.
Advertisement