Linux: Set File and Directory Permissions
Remove public access from a reports directory and give its group read access to one report. Work through it yourself in the live host terminal below.
Symptom
Remove public access from a reports directory and give its group read access to one report.
Your mission
Inspect, recover, then verify
Format
Linux shell
Investigate before you configure.
Use the CLI evidence to isolate the fault, make the smallest safe correction, then verify the network state changed.
Observe the symptom and link state.
Diagnose by comparing the protocol evidence.
Verify the expected device state and confirm the original symptom is resolved.
Console access: Linux
This workspace stacks for portrait phones. Rotate to landscape for the full split-screen console.
Need a hint?
Reveal the root cause when you're ready.
Try the investigation first, then use this as your escape hatch, not a dead end.
Create a free account to open Linux: Set File and Directory Permissions. You get the root cause and the full step-by-step fix.
No spam. The fix lands in your inbox too. Your account includes 5 guided labs free. After that, the Learning Pass unlocks every remaining lab.
Lab debrief
Turn the session into a repeatable troubleshooting pattern.
Use this reference after your attempt: first explain the symptom, then verify the evidence, then confirm the repair.
The problem
The finance team's report directory is world-readable and world-writable. Its payroll file is also writable by everyone.
What you'll practice
- Read owner, group, and other mode bits
- Set a directory to 750
- Set a file to 640
- Understand why directories need execute permission for traversal
- Verify modes with stat
The topology
One Linux host has /srv/reports owned by labuser:finance with payroll.csv inside.
Commands to run yourself
The real diagnostic commands for this lab, copy-paste ready. Run these in the same order to reproduce the investigation on your own session.
ls -ld /srv/reportsls -l /srv/reports/payroll.csvTopology diagram
Rate this lab
No ratings yet
Fact-checked references
The commands and behaviour in this lab were checked against these primary references.
Frequently asked
Why does a directory need x?
Execute permission on a directory allows traversal to entries whose names you know. Reading lists names; writing changes entries.
Does chmod change the owner?
No. It changes mode bits. Use chown when ownership itself is wrong.
Ready to run this lab yourself?
No setup, no image sourcing. Book a session or ask for a live demo.