ArunNetworkingPro
๐Ÿง‘โ€๐Ÿ’ป

Linux+ Break Room ยท Mission 01

Past me deployed it wrong

Rule one: never deploy at midnight. Past me did anyway.

Late one night, past me deployed a little app called pizza-api, said "looks fine", and went to bed. It doesn't start. You have the deploy folder, yesterday's access log, a shared folder that has turned into a free-for-all, and an old backup nobody remembers. Clean it all up.

Mission 01 of 10System managementTroubleshootingNo sudo

๐Ÿงฐ What you need

Get the mission

curl -O https://arunnetworkingpro.com/labs/breakroom-mission-01.sh
bash breakroom-mission-01.sh
cd ~/breakroom/mission-01

Rule 4 of the Break Room: read it before you run it. less breakroom-mission-01.sh. Spoiler alert, though: the comments say exactly what gets broken. Detectives who want the full mystery can skip straight to running it.

Part A: make it run

A1

Try to start it

./app/run.sh

Write down the exact error. It's your first clue.

Hint

The error isn't about the app at all. It's about whether you're allowed to run the file. Compare ls -l app/run.sh with any command in /usr/bin.

A2

Make the script runnable

The owner can read, write and run it. Everyone else can read and run it. Only the owner can change it. What's the number for that?

Hint

Read = 4, write = 2, run = 1. Add them up for the owner, the group, and everyone else, in that order.

A3

It still fails

Read the script and find the file it needs. Give that file the smallest permission that makes the script work. No 777, no sudo.

Hint

Who runs the script? You. What does the script do with that file: read it, change it, or run it? Give exactly that, to exactly that person.

A4

The link to nowhere

app/current is a symlink. Prove it's broken using one find command (no ls, no test). Then fix it by creating releases/v2.1.4 with an empty file called VERSION inside.

Hint

find has a test that checks the type of the thing a link points to, not the link itself. Search man find for -xtype.

Part B: what happened yesterday?

logs/access.log has 5,000 requests in the usual web-server format. Every line looks like this:

10.0.2.14 - - [14/Aug/2026:00:00:07 +0000] "GET /healthz HTTP/1.1" 200 3172
$1            $4                           $6   $7       $8        $9  $10
B1

The noisiest visitors

Top 5 IP addresses by number of requests, with counts, busiest first.

Hint

Grab the first field, then sort so duplicates sit together, uniq -c to count them, sort again by number, and keep the top five.

B2

How bad was it?

How many requests got a server error (any status from 500 to 599)? One pipeline.

Hint

Check field 9 only. If you grep the whole line for " 5", you'll also catch byte sizes like 5120.

B3

The most-missed page

Which single path got the most 404 Not Found answers?

Hint

Filter lines where field 9 is 404, print field 7, then count like you did in B1.

B4

Bandwidth hog

How much data went to 192.168.5.7 in total? Answer in MiB, to 2 decimal places.

Hint

awk can add up field 10 for matching lines and print the total in its END block. 1 MiB = 1024 ร— 1024 bytes. printf "%.2f" does the rounding.

Part C: the shared folder and the old backup

C1

Fix the shared folder

shared/ is 777: anyone can delete anyone's files. Make it a proper team folder. New files should belong to the folder's group, and people can only delete their own files. Which number did you use, and what are the two special bits called?

Hint

Normal permissions have three digits. Special bits go in a fourth digit at the front: 4 = setuid, 2 = setgid, 1 = sticky. You want two of them. And while you're there, does "everyone else" really need to write here?

C2

Peek inside the old backup

Without unpacking it to disk, list what's inside archive/backup-2026-08-01.tar.gz, then print the file ending in .env straight to the screen.

Hint

tar has a "list" mode, and a flag that sends extracted files to your screen instead of to disk. Check man tar for -t and -O. (Then think about why passwords sitting in old backups is a problem.)

โœ… How you know you won

./app/run.sh prints starting pizza-api on port 8443 as followed by your username.

find app -xtype l prints nothing at all (no broken links left).

ls -ld shared shows an s in the group part and a t at the end, something like drwxrws--T.

Answer key (no peeking until you've tried)

A2: 755. A3: 400 (or 600). B1: 192.168.5.7 (2189), 172.16.9.44 (1262), 10.0.2.3 (57), 10.0.2.14 (54), 10.0.2.37 (51). B2: 272. B3: /api/v1/status (52). B4: 50.10 MiB. C1: 3770, setgid + sticky. 3775 is fine too if others should be able to look.

๐Ÿ’ฅ Break it again

Run the script again. Everything is broken again, fresh:

bash breakroom-mission-01.sh

Now do it without the hints. Then try it using a different command for every task. There's always more than one way.

๐Ÿง  What's really going on

Running a file needs the x bit. A script without execute permission is just a text file, even if it's full of perfect bash. And the script runs as you, so every file it opens has to be readable by you, too.

Least privilege is a habit, not a number. 777 "works", the same way leaving your front door open "works". Always ask: who needs this, and do they need to read, write or run it?

A symlink is just a sticky note with an address. If the address doesn't exist, the note is still there, pointing at nothing. ls won't complain, which is why finding broken links is its own skill.

Logs are just columns. Once you see a log line as numbered fields, awk, sort and uniq -c can answer almost any question about it. The trap in B2 is real: search the whole line for "5" and you'll also count file sizes that start with 5.

Two special bits fix shared folders. Setgid on a folder makes new files inherit the folder's group. The sticky bit means you can only delete your own files. Together they're how team folders should work.

Same on every Linux. Everything in this mission works the same on Debian, Ubuntu, Fedora and Red Hat. No differences to worry about this time.

โ† Back to the Break Room ยท Stuck, or found a better way? Email me

๐ŸŽ‰ Got it, thank you!

Your comment just landed in my inbox. I read every one, and I'll reply by email.

๐Ÿค” That didn't go through

Something in the form looked off. Check your name, email and comment and try again, or just email me.

๐Ÿข Whoa, slow down

That's a lot of comments in a short time, so the box is taking a breather. Try again later, or email me.

๐Ÿ˜ด The comment box is napping

My server is taking a quick break, so your comment couldn't be sent. Sorry! Please email me instead.

๐Ÿ’ฌ Leave a comment

Stuck, found a better way, or just built it and want to brag? Tell me. It comes straight to my inbox (nothing is posted publicly), and I'll reply by email.

Your email is only used to reply to you. Never shared, never added to any list.