Short answer: type either form and both appear, with a row per class and a plain-language summary. The special bits are called out separately because they change what a file can do, not just who can run it.
The digits, decoded
chmod 640 notes.txt gives the owner read and write (4 + 2), the group read (4), and everyone else nothing (0). In symbolic form that is rw-r-----. Six of the eight possible digits appear in the wild; if you ever see a 7 in the group slot of a secret file, it is worth asking why.
What the special bits actually do
- setuid (4) — a program runs with the file owner’s privileges, which is how
passwdwrites to/etc/shadow. On a script it is ignored by Linux. - setgid (2) — on a program, run with the file’s group; on a directory, new files inherit the directory’s group instead of the creator’s. The second behaviour is the useful one in shared projects.
- sticky (1) — in a shared directory, only a file’s owner (or root) may delete it.
/tmpis1777for exactly this reason.
Checking a mode a Dockerfile or deploy script set? Paste both versions into thetext diff rather than reading octal digits side by side, and use thebase converter if you need to see the same number in binary.