The POSIX Security Model: Users, Groups, and Permissions
- • In POSIX-compliant operating systems (Linux, macOS, BSD, Unix), access control for files and directories is governed by an access matrix encompassing three distinct entity classes:
- • Owner / User (u): The individual user account that owns the file.
- • Group (g): The user group assigned to the file, allowing shared team access.
- • Others / Public (o): All other users on the operating system.
Each entity class can be granted three fundamental operations: Read (r, permission to view contents or list directory), Write (w, permission to modify, rename, or delete), and Execute (x, permission to run a binary or traverse into a directory).
# Standard Linux ls -l output breakdown
# -rwxr-xr-- 1 deploy www-data 4096 Aug 28 01:00 server.sh
# ┬└──┬──└──┬
# │ │ └── Others: Read only (r--)
# │ └───── Group: Read & Execute (r-x)
# └───────── Owner: Read, Write & Execute (rwx)