A single-page Unix permission calculator. Type octal, type symbolic, or
click bits in a 4x3 grid. Each input drives the others live. Includes
setuid, setgid, and sticky, an ls -l preview that switches by entry
kind, and a live chmod command with a configurable path.
Live: https://truffle.ghostwright.dev/public/tools/chmod/
Three ways in:
- Octal field. Three digits (
644) or four (4755). The leading digit, when present, is the special-bits nibble: setuid (4) + setgid (2) + sticky (1). - Symbolic field. Nine characters (
rwxr-xr-x) or ten with a leading entry-kind character (-rwxr-xr-x). When a special bit is set, position 3 or 6 or 9 becomess/Sort/Tdepending on whether execute is also set. - Bit grid. A 4x3 grid of user/group/other/special by read/write/ execute. Click any cell to toggle.
Four outputs:
- Octal (4 digits). Always shown with the special-bits nibble, even when it's zero, so the shape is consistent.
- Symbolic (9 chars). The rwxrwxrwx form, with
s/S/t/Tfor the special bits. ls -lpreview. Ten characters, leading with the entry kind (-,d,l).chmodcommand. Drop-in shell command with a path field. The leading zero is trimmed when the special-bits nibble is empty, so0644shows aschmod 644 path(matching the canonical form).
URL-hash state. #4755, #1777/d, #755/d/usr%2Flocal are all
bookmarkable.
- ACLs.
setfacl/getfaclis a different model entirely. - Capabilities.
setcap/getcapis another layer above the mode bits. umaskconversion. The complement is straightforward but adds a separate field for a separate concept.- Recursive chmod planning. The tool emits one command; the recursion is the operator's call.
- Filesystem-specific extensions. Some filesystems extend the basic mode bits with sparse-file flags, append-only, immutable, and so on. Out of scope.
These appear in the reference section of the tool, but they're worth saying once here too.
- OpenSSH refuses private keys with anything more permissive than
600. Symptom:Permissions 0644 for '~/.ssh/id_ed25519' are too open. - Directories need
xto be entered. A directory at755can be listed and traversed. At644the contents are listable but no entry inside is reachable. chmod -Rtreats files and directories the same. Usefind . - type d -exec chmod 755 {} +andfind . -type f -exec chmod 644 {} +to apply different modes to the two kinds.- setuid is silently dropped if the file is later modified by anyone other than root. Restore explicitly after edits.
- setuid is ignored on shell scripts on Linux as a security measure. Only compiled binaries respect it.
Open the live URL. Bookmark it. Save it for offline if you want; the HTML has no network dependencies.
To self-host, copy index.html to any static-file webroot. There is
no build step.
MIT. See LICENSE.
- tool-cron — 5-field cron expression tester
- tool-shell-quote — POSIX shell quoting in four forms
- tool-fish-completion-escape — fish completion-source escape pass simulator
- tool-robots-txt-check — robots.txt allow/deny tester
- tool-sun-path —
AF_UNIX
sun_pathbyte budget - tool-python-fstring-check — Python f-string version compatibility
Full index: https://truffle.ghostwright.dev/public/tools/