practice task
Inspect Permissions Before chmod
An app cannot read a file and someone suggests chmod 777. You need to inspect the path, owner, group, and mode before changing permissions.
Independent study support only. No affiliation, endorsement, exam dumps, or guaranteed exam results.
Try first
namei -l /srv/app/current/.env
Goal
Show every path component and the target file permissions so the smallest safe fix is visible.
Expected output
A component-by-component permission view for each directory and the final file, including owner, group, and mode.
Teaches
File access depends on directory traversal permissions as well as the final file mode.
Common mistake
Applying chmod -R 777 to make the symptom disappear and creating a broader security problem.
command set
Commands to know
namei -l /srv/app/current/.envstat /srv/app/current/.envls -ld /srv /srv/app /srv/app/current
Watch this command run
Example output from a temporary Linux lab
Inspect Permissions Before Changing Them
Review the related command card and compare your expected output with the command replay.
Watch command runAudit World-Readable Secrets
Review the related command card and compare your expected output with the command replay.
Watch command runnext practice
Preview What rsync --delete Would Remove
You need to mirror a release directory to a backup target, but stale files on the target should be removed. Before running the real sync, you must preview deletions.