DeveloperUtilityEducation

Chmod Calculator

Convert Unix file permissions between checkbox, octal (755) and symbolic (rwxr-xr-x). Handles setuid, setgid and the sticky bit, with a ready chmod command.

WhoReadWriteExecuteOctal
Owner (u)6
Group (g)4
Others (o)4

Octal

Symbolic

rw-r--r--

Command

chmod 644 file

Tick boxes or type an octal value (3 or 4 digits) — both stay in sync. The 4th leading digit encodes setuid/setgid/sticky.

How Unix permissions work

Every file has three permission sets — for the owner, the group, and everyone else — and each set has three bits: read (4), write (2) and execute (1). Add the bits per set to get one octal digit, giving the familiar three-digit number like 755 = rwx r-x r-x.

Common values

OctalSymbolicTypical use
644rw-r--r--Normal files
755rwxr-xr-xScripts, directories, binaries
600rw-------Private files (keys, .env)
700rwx------Private directories
777rwxrwxrwxWorld-writable (avoid!)
775rwxrwxr-xGroup-shared directories

The special bits

  • setuid (4xxx): an executable runs with the file owner's privileges (e.g. passwd). Powerful — use sparingly.
  • setgid (2xxx): on a directory, new files inherit its group — great for shared project folders.
  • sticky (1xxx): in a shared directory like /tmp, only a file's owner can delete it. Shows as t in the “other” execute slot.

Octal vs symbolic chmod

chmod 755 file sets permissions absolutely. Symbolic form changes them relatively: chmod u+x file adds execute for the owner only, chmod go-w file removes write for group and others. Use octal when you want an exact known state, symbolic for surgical tweaks. Directories almost always need the execute bit to be enterable, even though it isn't “running” anything.