Linux › Module 3 › Lesson 4
Lab — Permission Challenge
Practice chmod, ls -l, and secure file sharing in a mini challenge
Opening
Fix the permissions puzzle
A teammate left a script that will not run, and a config file that is too open. Your job: inspect with ls -l, fix modes with chmod, and verify—no GUI required.
1. Setup
cd ~/cyberlium-lab/module2 2>/dev/null || mkdir -p ~/cyberlium-lab/perms && cd ~/cyberlium-lab/perms echo "#!/bin/bash echo Lab script ran OK" > runme.sh echo "SECRET=api_key_demo" > config.env
2. Challenge Steps
1. Inspect both files: ls -l runme.sh config.env 2. Make runme.sh executable for you only (owner execute): chmod u+x runme.sh ls -l runme.sh 3. Run it: ./runme.sh 4. Lock down config.env so only you read/write (no group/other access): chmod 600 config.env ls -l config.env → should show -rw------- 5. Confirm others cannot read (optional—if you have a second test user, try cat as them).
CTF connection
Privilege escalation often starts with world-readable SSH keys or writable cron scripts. Training your eye on ls -l is how you spot those gifts attackers love.
Complete the Permission Challenge
Finish all steps. runme.sh must execute and print "Lab script ran OK". config.env must show mode 600 (-rw-------).