Interview Prep/Linux/Permissions, Users & sudo

What is the order in which the kernel checks permissions?

AdvancedConceptPermissions, Users & sudo
Answer

If you are the owner, only the owner bits apply. Otherwise, if you are in the group (or a named ACL user/group matches), only the group/ACL bits apply (capped by the mask). Otherwise others applies. The checks do not fall through: a file with mode 0077 denies its own owner even though others can read it. Root bypasses most checks (CAP_DAC_OVERRIDE), but still needs at least one x bit to execute a file.

All Linux questions Roadmap: Linux

More on Permissions, Users & sudo