The official Todd Michael collectionIndependent mind · original work

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

Expected Versus Actual: Writing a Permissions Prediction Before You Look

A small habit that makes reading file permissions in your own folder more reliable: write down what you expect to see before you run the command, then compare the result honestly.

The White Hat Bible, Volume 4: Programming, Scripting and Cryptography: Python, Bash, PowerShell and Applied Cryptography for Security — book cover
Explore The White Hat Bible, Volume 4

Why predict before you observe

Reading permissions is easy to do and easy to misread. A line of output like rw-r--r-- looks obvious once you know the pattern, but many learners glance at it, nod, and move on without checking whether their mental model was right. Writing a prediction first turns a passive glance into a small test. You commit to an expectation, then the output either confirms it or shows a gap you can study.

The sources in this series treat permissions as a basic concept: Linux access permissions separate the owner, the group and others, and the read, write and execute bits mean different things for regular files and for directories. Those are facts worth keeping straight. The habit of predicting is not something a source prescribes; it is a teaching method offered here as an original suggestion.

A worked example in a folder you own

Imagine you create a disposable folder named permission-practice inside your own home directory, then add one empty file called notes.txt. Before running any listing command, you write a prediction on paper: the owner should have read and write on notes.txt, the group and others should have only read, and the folder itself should show execute permission for you so you can enter it. Next you run a long-format listing and compare.

Suppose the output shows that the file is readable by others but the folder is missing execute permission for you. The gap is informative: you learn that a directory without execute permission blocks entry even when its contents might otherwise be readable. Write that down as an observation, not as a general rule about every system, because your umask, group setup and file system may differ. Note the limitation explicitly in your log.

A small reader exercise

Create your own disposable folder and one or two files, then complete this sequence. First, write three predictions about who can read, write and enter the folder. Second, run a listing and record the actual permission strings. Third, mark each prediction as confirmed, partly right or wrong, and write one sentence explaining the difference. Finally, delete the test folder and confirm it is gone. Keep the whole exercise inside a directory you created yourself.

Checklist for your prediction log:

Write the expectation before running any command.

Record the exact output, not a summary of it. Label each prediction as confirmed, partly right or wrong. Note what your check could not show, such as settings from other accounts or system policies. Delete the disposable folder when finished and note that you did.

Limits of this exercise

A single folder on one machine is a narrow view. It cannot tell you how a server, a shared drive or a production system is configured, and it says nothing about whether any real system is secure. Permissions are one layer among many. For planning and documenting technical checks more broadly, the NIST guide on information security testing discusses scope, recording findings and stating limitations; it does not promise that any single check is comprehensive, and neither should your notes.