📚 Table of Contents

So there I was, sitting in front of my terminal, sipping lukewarm coffee, when it hit me: I must protect this server like it's the last bastion of humanity... or at least make sure Bob the Web Developer doesn’t break stuff he shouldn’t touch.

In this epic (okay, modest) Linux quest, I spun up my beginner sysadmin skills to set up a secure web directory for a new user on Red Hat Enterprise Linux 9 — and made sure only they could mess with it.

Let me walk you through it. Capes are optional, but sudo is not.

The Mission: Lock It Down

🗂️ Objective: Create a user named webdev, give them their own digital playground in /var/www, and make sure no one else can peek, poke, or prank around in there.

Step 1: Summon the User

Every journey begins with a character creation screen, right?

Image description

Ignore the bad password

Boom! The user WEBDEV is born — ready to write code and forget semicolons.

Step 2: Build the Playground

We create a private little kingdom in the land of /var/www:

Image description

Like crafting a treehouse, but with fewer splinters and more file paths.

Step 3: Hand Over the Keys

We don’t want to be the micromanaging admin breathing over their neck. Let's make WEBDEV the rightful owner of their domain:

Image description

Ownership granted! It’s like handing them the keys to the kingdom… or at least their folder.

Step 4: Lock the Gates

Now we tighten the screws. No other user shall pass!

Image description

This command gives full power to the owner and zero to everyone else. Gandalf would be proud: "YOU SHALL NOT ACCESS!"

Step 5: Drop Some Code Magic

Let’s simulate the WEBDEV actually doing some work:

Image description

Voilà! One

tag later, and it’s like their first Hello World — but shinier.

Step 6: Check Your Work Like a Paranoid Pro

Always inspect what you expect:

Image description

Permissions? Check
Ownership? Check
Index file? Check
Sense of accomplishment? Off the charts.

What I learned (or, Level Ups Earned)

  • Creating users like a mini HR department

  • Using chmod and chown like a digital locksmith

  • Keeping the server clean, secure, and structured

  • Practicing good habits like verifying everything before bragging on LinkedIn

Thanks for coming to my terminal talk. If you made it this far, you're either interested in Linux... or just waiting to see if I break something. Either way, I appreciate you.

Real Talk

I started learning Linux because, frankly, I got tired of hearing “It works on my machine” and not knowing why. What began as curiosity quickly turned into a full-blown terminal addiction—I now find joy in solving problems with a few lines of commands (and occasional Googling). It’s stretched my brain, improved my confidence, and made me feel like I’ve joined an elite club of keyboard wizards. Long term, I’m aiming to become a cloud architect, and I know mastering Linux is like learning the language of the cloud—minus the fancy accents, but with way more sudo.

Thanks for sticking around and joining me on this wild ride — I promise there will be fewer typos and more progress as we go!