Skip to content
Clairos Learn

Permissions and users · Lesson 10 of 33 · 6 minutes

Protected paths

Try a blocked system delete and inspect the protected file.

Mastery 0/3Run itExplain itApply it
learner@clairosSimulated Linux lab
learner@clairos:~ $
↑ history · Tab complete · Ctrl+C cancel · Esc, Tab to leaveExit 0

Understand the pattern

Safety controls matter when teaching destructive commands.

rm
Remove the named file from the virtual workspace. The training root and system trees are guarded.

Simulator protections are not a promise that a real shell will protect the same target.

stat
Inspect a file or directory metadata record, including ownership, permissions, and size.

Metadata and file contents answer different questions.

whoami
Print the effective user name.

An elevated command can run with a different effective identity from the normal shell.

Worked example and expected result
$ rm /etc/passwd
System paths are protected. Remove files only inside /home/learner.

Exit status: 1. This nonzero result is an expected part of this exercise.

$ stat /etc/passwd
Path: /etc/passwd
Type: file
Mode: -rw-r--r--
Owner: root
Group: root
Size: 147 bytes

Exit status: 0. The command completed successfully in the training fixture.

$ whoami
learner

Exit status: 0. The command completed successfully in the training fixture.

Try a variation

Repeat this workflow in the sandbox with a different scratch filename. Keep the system fixtures unchanged and compare the observed output with your expectation before moving on.

Explain it

In “Protected paths”, which interpretation is safe?

Apply it elsewhere

Before adapting the stat workflow from “Protected paths” to another server, what should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Group collaborationTry an incident drill

Anonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.

Keep learning

  1. 01Public and private filesCompare web-readable and private-note permissions.Practice
  2. 02Group collaborationCreate a shared lab note and set group-oriented metadata.Practice
  3. 03Temporary directory conceptInspect simulated /tmp and keep scratch work inside home.Practice