Part 1 of 7 · 1 min read
Why this page comes last
In this module you will
- Read the exact error of a failed
openand say which family of causes it points to. - Walk a path with
namei -land find the one directory that refuses a process. - Read the user, group, capability,
no_new_privsand seccomp fields of a running process from/proc. - Explain why a file that others may read can still be unreadable, and fix it with the smallest change.
- Follow a checklist that covers file modes, capabilities, limits, filters, the file view and security policy.
Pages 1 to 6 gave the parts: the access matrix, users and file modes, authentication, capabilities, memory-safety defences and sandboxes. This page closes Level 10 with the question that every administrator meets: "The program says permission denied, and the file looks readable." The method uses each part in turn and ends with the smallest change that fixes the problem. Level 11 then moves to virtualisation and containers, where the same checks run inside a smaller world.
About this example About this example
Real: Every command and its output come from a Linux test machine (kernel 6.18). The tests ran as the unprivileged user nobody (ID 65534), started with setpriv from a root shell. The path, the file contents and the mode bits are exactly as shown.
Scripted: The story of an operator who cannot read a report is made up to give the work a shape. The directory names proj and private and the word top inside the file are made up.
Not real: The test machine has no SELinux or AppArmor, so the policy step in section 5 is described and not shown. A production host has many more users, groups and mounts.