Permissions
Translate Unix file permissions between octal and symbolic, and read back what each bit actually allows.
$ ls -l -rwxr-xr-x 1 chance staff file
ownerread, write and execute
groupread and execute
othersread and execute
The execute slot doubles as the special-bit slot: lowercase s or t means the execute bit is set as well, uppercase means it is not. Paste a line straight out of ls -l — trailing @, + and . markers are ignored.
`644` and `rw-r--r--` are the same thing, and most people can convert the common ones from memory and then hesitate on the rest. The setuid, setgid and sticky bits are where hesitation turns into a security problem.
Enter either form and get the other, with each of the nine permission bits spelled out for owner, group and others, plus a note when a special bit is set. It is the fastest way to check that a deploy script is not about to make something world-writable.
What people open it for
- Converting an octal mode into who-can-do-what before running chmod
- Checking what a mode in a Dockerfile or Ansible task grants
- Understanding setuid, setgid and the sticky bit
In the terminal
chmod 644
Every utility is also a command in the desktop's shell.