Skip to content

rw-r--r-- 1 user group 512 Jan 1 00:00 potion

Racks of weapons line the walls. Suits of armour stand at attention. But every sword and potion is locked behind a permission barrier β€” you must learn chmod before you can equip a single item.

πŸ•ΉοΈ Play This Chamber

This page is your walkthrough and strategy guide β€” play right here in the browser, then follow the steps below.

{% include bashcrawl-terminal.html room="Armoury" %}

🎯 Quest Objectives

  • Read ls -l output and interpret permission bits
  • Use chmod to make scripts executable
  • Run ./potion to restore health
  • Run ./sword to equip your weapon
  • Defeat the armoury guardian
  • Proceed to the Chamber

πŸ—ΊοΈ Quest Prerequisites

⚑ Command Cheatsheet

Command What It Does
ls -l Long listing β€” shows permissions, owner, size
chmod +x file Add execute permission for everyone
chmod 755 file rwxr-xr-x β€” owner can all; others can read+execute
chmod 644 file rw-r--r-- β€” owner can read+write; others read only
./script Execute a script in the current directory

Permission String Decoder

-  rwx  r-x  r-x
β”‚   β”‚    β”‚    β”‚
β”‚   β”‚    β”‚    └── others (o)
β”‚   β”‚    └─────── group (g)
β”‚   └──────────── user / owner (u)
└──────────────── file type: - = regular, d = dir, l = link

Each group: r = read (4), w = write (2), x = execute (1)

Octal shorthand: 755 = rwx r-x r-x, 644 = rw- r-- r--

πŸ—ΊοΈ Walkthrough

Step 1 β€” Inspect the armoury

ls -l
# -rw-r--r-- 1 user group  512 Jan  1 00:00 potion
# -rw-r--r-- 1 user group 1024 Jan  1 00:00 sword
# -rwxr-xr-x 1 user group  256 Jan  1 00:00 guardian

potion and sword lack the x bit β€” they are not yet executable. You cannot run them.

Step 2 β€” Try running a locked script

./potion
# bash: ./potion: Permission denied

This is the expected result. Now fix it.

Step 3 β€” Grant execute permission

chmod +x potion
chmod +x sword
ls -l potion sword
# -rwxr-xr-x 1 user group  512 Jan  1 00:00 potion
# -rwxr-xr-x 1 user group 1024 Jan  1 00:00 sword

Why the ./? When you type ./potion, the ./ tells the shell to run the script in the current directory. Without it, the shell only searches the directories in your PATH β€” and . (the current directory) is not in PATH by default, so potion alone would fail with "command not found".

Step 4 β€” Drink the potion

./potion
# HP restored: 50 β†’ 100

Step 5 β€” Pick up the sword

./sword
# Sword of Echoes added to inventory.

Step 6 β€” Face the guardian

./guardian
# A stone golem steps forward...
# You raise your sword...
# Guardian defeated! The door creaks open.

With the sword equipped, the guardian falls and the door to the Chamber opens. List the room (ls) to find the path onward, then step through into the Chamber's directory (for example, cd ../chamber).

Low on health? Your HP carries over between rooms. If a fight leaves you weakened, re-run ./potion (if a potion is still available) before moving on.

πŸ’‘ Understanding Octal Permissions

Octal Symbolic Who Can Do What
777 rwxrwxrwx Everyone can read, write, execute ⚠️
755 rwxr-xr-x Owner: all; others: read + execute βœ…
644 rw-r--r-- Owner: read + write; others: read only βœ…
600 rw------- Owner only β€” private files πŸ”’
400 r-------- Read-only, even for owner

Security note: Never use chmod 777 on scripts or sensitive files. Use 755 for scripts and 644 for data.

πŸ’‘ Common Pitfalls

Problem Cause Fix
Permission denied after chmod Not the file owner Use ls -l to check owner
Script does nothing Missing shebang line Add #!/usr/bin/env bash as line 1
No such file: ./sword Wrong directory pwd and ls first
Health still low after potion Stale game state Re-run the bashcrawl setup or restart the game from the entrance, then revisit the room

βœ… Validation

  • You can read a permission string like rwxr-xr-- without looking it up
  • You understand why ./ is needed to run a script
  • You ran both ./potion and ./sword successfully
  • The guardian is defeated and the Chamber door is open

➑️ Next Steps


{% include bashcrawl-play-local.html %}

πŸ“š External Resources

Continue your terminal adventure with these resources:


Sword in hand, potion consumed. The Chamber awaits. βš”οΈ

πŸ•ΈοΈ Knowledge Graph

Structured wiki-links connect this quest to the IT-Journey knowledge graph. Open the Obsidian Graph View to explore connections.

Level hub: [[Level 0000 - Foundation & Init World]] Overworld: [[🏰 Overworld - Master Quest Map]] Prerequisites: [[Bashcrawl Cellar: File Types, Aliases, and Emerald Amulet]] Unlocks: [[Bashcrawl Chamber: Bash Arithmetic and the Statue Boss]] Sequel quests: [[Bashcrawl Chamber: Bash Arithmetic and the Statue Boss]] Obsidian docs: [[Obsidian Knowledge Graph and Wiki Links]]