~/tahatec
Chmod Calculator app icon

Chmod calculator: what a file mode really does

Type a mode such as 755, rwxr-xr-x or a whole ls -l line and see what it allows for the owner, the group and everyone else, the chmod commands that produce it, and a warning for every way it does not mean what it looks like it means.

  • Octal & symbolic
  • GNU vs BSD
  • umask
  • Offline
Chmod Calculator screenshot 1 Chmod Calculator screenshot 2 Chmod Calculator screenshot 3 Chmod Calculator screenshot 4

Read any mode, build one by tapping

The app takes octal, letters or an ls -l line and shows all three forms plus a plain-English sentence. A three-by-three grid of owner, group and others against read, write and execute shows each digit and the sum it comes from, with switches for setuid, setgid and the sticky bit. A capital S or T is called out as a special bit doing nothing.

Evaluate any chmod argument

Type u+x, go-w, a=r, g=u, +X or 2755 as you would at the shell and see the result clause by clause before you run it. The umask is applied exactly where chmod applies it: only when you leave out the who part.

Linux and macOS do not run the same chmod

Switch implementations with one tap; where they disagree the app shows both answers. Every behaviour was measured by running tens of thousands of cases against both real chmod binaries.

Findings, umask and a guide

World-writable files, a setgid program its own group can rewrite, a directory its owner cannot enter, execute without read: each finding says what happens and one tap applies the fix. umask works both ways, from mask to resulting modes and back, and the guide covers the sticky bit on /tmp, SSH key permissions and the chmod -R mistake with its capital-X fix.

Questions

What does chmod 755 mean?
The owner can read, write and execute (7 = 4+2+1); the group and everyone else can read and execute (5 = 4+1). As letters it is rwxr-xr-x.
What is the difference between chmod 644 and 755?
644 (rw-r--r--) is the usual mode for ordinary files: no one can execute them. 755 adds execute for everyone and is the usual mode for directories and scripts.
Why did chmod 755 not remove the setgid bit on my directory?
GNU chmod deliberately keeps setgid on directories when you give a numeric mode. Use chmod g-s or a five-digit mode such as 00755 to clear it.

Free on Google Play, supported by ads. Read the Chmod Calculator privacy policy. Questions or a bug? Write to support@tahatec.com.