Skip to main content
Settings
Search
Appearance
Theme Mode
About
Jekyll v3.10.0
Environment Production
Last Build
2026-07-08 07:12 UTC
Current Environment Production
Build Time Jul 08, 07:12
Jekyll v3.10.0
Build env (JEKYLL_ENV) production
Page Location
Page Info
Layout quest
Collection quests
Path _quests/0000/bashcrawl/armoury.md
URL /quests/0000/armoury/
Date 2026-05-22
Theme Skin
SVG Backgrounds
Layer Opacity
0.6
0.04
0.08

Bashcrawl Armoury: File Permissions and Script Execution

Learn chmod, file permissions, and script execution in Bashcrawl's Armoury. Brew a health potion and wield a sword for your first combat encounter.

🌱 Lvl 0000Apprentice ⚔️ Side Quest 🟡 Medium 25-30 minutes

Bashcrawl Armoury: File Permissions and Script Execution

Master chmod, read permission bits, and execute armoury scripts to brew potions, equip your sword, and unlock the next chamber.

Primary Tech
🛠️ bash
Skill Focus
Fullstack
Series
Bashcrawl Adventure Path
Author
IT-Journey Team
XP Range
⚡ 0-250

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.

🕹️ Bashcrawl — Web Terminal Open full screen ↗

The game loads in the Entrance. Use cd to make your way to the Armoury chamber, then follow the walkthrough below. Progress saves in your browser. Prefer a real shell? See Install & Play Locally.

🎯 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


🖥️ Advanced: Install & Play Locally

The embedded terminal above is the fastest way to play — but the advanced version runs Bashcrawl in a real shell on your own machine, with the full Textual TUI, agent mode, and a genuine filesystem sandbox. The walkthrough on this page works identically in either mode.

Option A — Clone the game

git clone https://github.com/bamr87/bashcrawl.git
cd bashcrawl
./setup.sh        # one-time setup: dirs, permissions, help system
./main.sh         # launch the adventure (interactive menu)

Option B — It already ships with IT-Journey

Bashcrawl lives in this repository as the submodules/bashcrawl git submodule. If you cloned IT-Journey, pull it down and play in place:

git submodule update --init submodules/bashcrawl
cd submodules/bashcrawl
./setup.sh
./main.sh --interactive

Play modes

CommandModeBest for
./main.sh --interactiveTextual TUI (recommended)A rich local interface — needs Python 3 + textual
./main.sh --classicClassic bash emulatorSystems without Python
./main.sh --nativeNative terminalThe full real-filesystem experience
./main.sh --tutorialTutorial modeGuided, step-by-step learning
./main.sh --agentAgent modeAI automation and screenshots
./main.sh --helpHelpAll launcher options

Want to host the browser build yourself? From the game directory run make web-preview and open http://127.0.0.1:8000. The same static build is what powers the embedded terminal above (bamr87.github.io/bashcrawl).

📚 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]]

🎁 Rewards

🕸️ Quest Network

Loading quest graph…

Click a node to open the quest · ⌘/Ctrl-click for a new tab · drag to reposition · scroll to zoom.