Unix-Style File Permissions
Owner, group and others each receive read, write and execute; the effective service identity determines which boundary actually exists.
Frame the problem
Security starts with a concrete asset, attacker capability and trust crossing.
Why the system fails
World-readable secrets, group-writable executables or shared service users collapse intended isolation.
The important question is not “what is Unix-Style File Permissions?” but “which assumption let untrusted data or an over-scoped identity cross process user/group → filesystem object?” Trace the decision at the boundary, then constrain what can happen after the first control fails.
Design the control in layers
Start with the control closest to the interpretation or privilege boundary: Use dedicated users and least-readable modes Then add a control that reduces blast radius and telemetry that proves the decision was enforced.
The resulting design is not labelled secure. Record the identified controls, the known failure paths, the remaining exposure, and the evidence you would need during an incident.
| Prevent | Detect | Recover |
|---|---|---|
| Use dedicated users and least-readable modes · Keep code immutable to runtime identities · Audit ownership as well as mode bits | Permission drift and writes to executable/configuration paths | Contain the affected identity or component, scope impact from audit evidence, and preserve a regression test. |
Key points
- Asset: Configuration, secrets, executables and application data on Unix-like systems.
- Boundary: Process user/group → filesystem object
- Primary control: Use dedicated users and least-readable modes
- Detection signal: Permission drift and writes to executable/configuration paths
- Always ask what limits damage when the primary control fails.
Follow the attack
Safe conceptual simulation: capability → missing control → crossed boundary → asset impact.
- 1Attacker starts with: A local process running as another user or group.
- 2World-readable secrets, group-writable executables or shared service users collapse intended isolation.
- 3The weak or missing boundary control is crossed: Process user/group → filesystem object
- 4Impact: Secret disclosure, executable replacement or data tampering.
- Secret disclosure, executable replacement or data tampering.
Defend, detect, recover
One prevention is a single point of security failure. Layer it and make failure observable.
- • Use dedicated users and least-readable modes
- • Keep code immutable to runtime identities
- • Audit ownership as well as mode bits
- • Permission drift and writes to executable/configuration paths
- • Contain the affected identity or component.
- • Scope access from audit evidence.
- • Fix the boundary and add a regression test.
- • Misconfiguration and new access paths can bypass the intended control.
- • A privileged insider or compromised control plane may still reach the asset.