devopscodepro
Language
Runs entirely in your browser — nothing leaves this page.

chmod calculator

Unix permissions both ways: checkboxes, octal and ls-style symbolic stay in sync, with SUID, SGID and the sticky bit explained.

read
write
exec
Owner (u)
Group (g)
Others (o)
chmod 755 file
chmod u=rwx,g=rx,o=rx file

Reading and writing Unix permissions

Three views of the same nine bits, kept in sync: tick the checkboxes, type an octal mode like 755, or paste the symbolic string straight from ls -l — including a leading file-type character and the s/S/t/T special-bit letters. The tool renders the chmod command in both octal and u=rwx,g=rx,o=rx forms.

The special bits are where permissions actually get misunderstood, so they are explained in place: SUID executes a binary as its owner, SGID makes directories inherit their group, and the sticky bit is the reason anyone can write to /tmp but only you can delete your files there.

Why does my octal mode have four digits?

The leading digit encodes the special bits: 4 = SUID, 2 = SGID, 1 = sticky, added together. 4755 is a SUID root binary like passwd; 1777 is a world-writable sticky directory like /tmp; 2775 is a shared group directory.

What is the difference between s and S in ls output?

Lowercase s means the special bit and the execute bit are both set. Uppercase S means the special bit is set but execute is not — which is almost always a mistake, since SUID without execute does nothing.

What should config files and SSH keys be?

600 (owner read/write only) for secrets — SSH refuses a private key that is readable by others. 644 for ordinary config files, 755 for directories and executables. If a tool complains about permissions being too open, 600 is nearly always the fix.

Is chmod 777 ever the right answer?

Practically never. It makes a file writable by every account on the machine, including a compromised web server's. When several users need write access, the right tools are a shared group with SGID on the directory, or ACLs — not world-writable bits.

Related tools: Dockerfile analyzer, K8s manifest validator and Cron parser.