The official Todd Michael collectionIndependent mind · original work

2026-11-04 · By the The White Hat Bible editorial team

Reading a Permission Bit Without Inflating What It Means

A small, owned-directory exercise for connecting a permission listing to a precise, limited observation, and for resisting the urge to call that observation a security verdict.

The White Hat Bible, Volume 5: Offensive Security: Web Hacking, Malware, Reverse Engineering and the Red Team Path — book cover
Explore The White Hat Bible, Volume 5

Start With What the Bits Actually Say

Linux file access permissions separate three audiences: the file owner, the owning group, and everyone else. Each audience can be given read, write, or execute rights, and the meaning of those three bits shifts depending on whether the object is a regular file or a directory. For a regular file, read lets you view contents, write lets you change them, and execute lets the file run as a program. For a directory, read lets you list names, write lets you add or remove entries, and execute lets you pass through to reach entries by name. Keeping those two meanings separate prevents a common mistake: reading a listing like drwxr-x--- and assuming the folder is simply "locked down" or "open."

This is a description of how the mechanism is defined, not a claim about any particular system you might be looking at. A listing tells you the stored mode bits. It does not, by itself, tell you about access control lists, mount options, namespaces, or other layers that can change the outcome.

A Worked Example in Your Own Scratch Folder

Imagine a hypothetical scratch directory you created yourself, named notes-lab, containing one text file called sample.txt. You list it and see that the directory has mode bits allowing the owner full access, the group read and traverse, and others nothing. Before you look, write a prediction: "Another user in my group should be able to list the directory but not create files in it." Then check. Suppose the observation matches. Your recorded note should read: "Observed group read and execute on notes-lab; group could list entries; group create attempt was not tested." Notice what that note does not say. It does not claim the folder is secure, and it does not claim the group is blocked from everything, because you tested one behavior, not all of them. The gap between what you tested and what you concluded is the whole lesson.

A Small Exercise and a Checklist to Keep Notes Honest

Exercise: Make a fresh directory you own, set its permissions to something you chose, and write three predictions about what each permission bit should allow for owner, group, and others. Check each prediction against the listing and against one simple action you are allowed to take on your own files. Then rewrite each result as an observation with a limit attached, such as "not tested from a second account" or "checked with ls only."

Checklist: Confirm the directory and every test file live only in your own disposable area. Write your prediction before running any command. Record the exact mode string you saw. Note which audience you tested and which you did not. Name at least one limitation of the check. Delete the scratch directory when you finish, and write one sentence confirming the cleanup. Guidance on scoping and recording tests like this appears in NIST SP 800-115, a 2008 guide that also stresses that assessments have benefits and limits and should be planned with defined scope, findings, and mitigation in mind. Use it as a reminder that an observation is only as strong as the scope that produced it.