Lock Down the Ship's Files

Linux lab Intermediate 6 tasks 20 points

Someone made a mess of the permissions in the ship folder. Some secrets are open to everyone, and the scripts won't run. Fix them with chmod, then run the launch script.

How it works: the terminal below is a real Linux machine running in your browser. Click it and type. Tasks tick themselves off as you complete them; questions are answered in the box under each task. Press Reset any time for a fresh machine. Your password on this machine (for sudo) is student.

student@vulntech:~ Starting…
Getting your Linux machine ready…
The first start downloads about 20 MB. After that your browser keeps it, and labs start in a moment.

Hints

Check your work with ls -lR ship.

Solution explanation

Numbers are quickest here: 600 for private files, 700 for a private folder, 755 for scripts and public folders, 644 for public files. One chmod can take several files, and wildcards like scripts/*.sh work too. Once the script has x, ./scripts/launch.sh runs it.

Show solution
cd ship
chmod 600 diary.txt keys/id_ed25519
chmod 700 private
chmod 755 scripts/*.sh
chmod 755 public
chmod 644 public/*.html
./scripts/launch.sh
HOME LABS COMMUNITY DASHBOARD