LINUX / A CONCEPT NOTE
File Permissions
rwx and who you are
Overview · mechanism
pitfall · examples
01 / THE SHORT VERSION
The idea in a few sentences.
Linux assigns read (r), write (w), and execute (x) permissions to three ownership tiers: User (owner), Group, and Others. Represented numerically: r=4, w=2, x=1.
02 / FOLLOW THE MECHANISM
How permission checking flows
Access call
a process tries to read, write, or execute a file.
User tier
if the process owner matches the file owner, User permissions are checked.
Group tier
if the owner doesn't match but matches the file's group, Group permissions are checked.
Other tier
if neither matches, Others permissions are applied. If permissions fail, access is denied.
04 / COMMAND NOTES
Read the command, then the result.
Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.
list files with ownership and permission strings
ls -lmake file readable/executable by everyone, writeable only by owner
chmod 755 script.sh05 / CHECK YOURSELF
Could you explain File Permissions to a teammate?
Try it out loud in two sentences: what it is, and the one detail that changes the picture. If you stall, the gap is the part to reread.
Up next in Linux & systemsFilesystem Hierarchywhy /var, /etc, /opt exist