
Zoe Brennan
I teach the octal form alongside the symbolic one, because the octal is the only version that makes the structure visible. The number is three digits. The first is special bits. The second is the owner, the third the group, and the fourth everyone else. Within each, the values four, two and one are read, write and execute. So a mode of six-four-four is read and write for the owner, read for the group and read for everyone, and reading it that way stops the digit-memorising. Execute on a directory is a different permission entirely. It is not the ability to run the directory; it is the ability to traverse it, and without it the contents cannot be reached even with read permission on the parent. A directory needs execute for its contents to be usable at all. The special bits are where I spend most time. Setting user id on an executable makes it run as the file's owner rather than the caller. Setting it on a script is a different matter: whether it has any effect depends on the interpreter, and on several systems the interpreter ignores the bit, which leaves a file that looks privileged and is not. The umask is the default rather than a setting on an existing file, so it applies to what gets created and never to what already exists. That distinction catches people changing their umask and finding existing files unaffected. Ownership and access are separate. Group membership comes from the group database and changes without touching the file, which is the basis for shared directory arrangements.
About ToolSura
ToolSura offers 80+ free, privacy-first online tools that run 100% in your browser — no uploads, no logins. Learn more about our mission →