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.
More on Permissions, Users & sudo
Explain the rwx permission model for files and directories.BeginnerHow does octal notation work in chmod?BeginnerWhat does chown do and who can run it?IntermediateWhat is umask and how is the final permission calculated?IntermediateWhat is SUID and give a real example?IntermediateWhat does SGID do on files versus directories?Intermediate