Unofficial practice
User, Group, and Permission Check
A command fails with access trouble. Read the user, group, mode, and path traversal evidence before changing ownership or permissions.
Linux One Liners is an independent study and practice resource. It is not affiliated with, endorsed by, or approved by LPI, The Linux Foundation, CompTIA, or any certification provider. This site does not provide exam dumps or real exam questions.
Try first
id app && namei -l /srv/app/current
Troubleshooting ladder
- Name the symptom.
- Inspect read-only state.
- Find the owner, service, file, device, mount, or route.
- Read the decisive output field.
- Choose the next narrow command.
- Avoid broad or destructive changes.
- Make the smallest justified change if required.
- Verify and record what changed.
drill evidence
Sample output and answer key
Command anatomy
id app && namei -l /srv/app/current
namei -l- show permissions for each path component
stat- show owner, group, mode, and timestamps
id- show the user and group context
target- the exact path or account under review
Annotated output
f: /srv/app/current/.env
drwxr-xr-x root root /
drwxr-xr-x root root srv
drwxr-x--- deploy www-data app
drwxr-x--- deploy www-data current
-rw------- deploy deploy .env
uid=33(www-data) gid=33(www-data) groups=33(www-data)
What to notice
- each path segment
- where traversal can fail
- mode
- which read/write/execute bits exist
- owner/group
- who can access the object
- effective user
- which account the service actually uses
Safe vs unsafe move
Common wrong move
Only checking the final file and missing an execute bit on a parent directory.
Next safe command
systemctl show nginx -p User -p Group
Goal
Prove the condition with command output before changing the system.
Safe first command
id app && namei -l /srv/app/current
Correct interpretation
The decisive fields are `each path segment`, `mode`, `owner/group`. The affected object is the path, user, address, or package named by the command output. The next safe command is `systemctl show nginx -p User -p Group` because it narrows the evidence without jumping to a broad fix. Watch out for this wrong move: Only checking the final file and missing an execute bit on a parent directory.
Next safe command
systemctl show nginx -p User -p Group
Common wrong move
Only checking the final file and missing an execute bit on a parent directory.
Self-check
Which path component, owner, group, or mode blocks access for the effective user?
source and objective
Related cert objective
Source status: LPI LPIC-1 overview verified July 3, 2026. Current version 5.0; exams 101-500 and 102-500.
Related command pages
Why this matters
The point is not to memorize a flag. It is to read the evidence, name the next safe check, and avoid the tempting broad fix.