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.
check your answer
Answer key
What should your command prove?
A component-by-component permission view for each directory and the final file, including owner, group, and mode.
How to explain it
File access depends on directory traversal permissions as well as the final file mode.
What to avoid
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
answer check
Compare expected output
Open these command examples to compare your answer against realistic output.
next 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.