Skip to content
Back to Learning
Linux · AdministrationBeginner

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.

Simulated labLinuxPermissionschmodSecurity

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

Linux: Set File and Directory Permissions

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.

Locked

Create a free account to open Linux: Set File and Directory Permissions. You get the root cause and the full step-by-step fix.

Already have an account? Sign in

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.

Inspect directory
ls -ld /srv/reports
Inspect file
ls -l /srv/reports/payroll.csv

Topology diagram

Rate this lab

No ratings yet

Your rating

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.