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.
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.
🎯 Quest Objectives
- Read
ls -loutput and interpret permission bits - Use
chmodto make scripts executable - Run
./potionto restore health - Run
./swordto equip your weapon - Defeat the armoury guardian
- Proceed to the Chamber
�️ Quest Prerequisites
- Cellar side-quest complete
- Comfortable with
ls -F,cat, and file navigation
⚡ 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
-rwxr-xr-x
│└──┘└──┘└──┘
│ u g o
│ user group others
└── 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 01 potion
# -rw-r--r-- 1 user group 1024 Jan 01 sword
# -rwxr-xr-x 1 user group 256 Jan 01 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 01 potion*
# -rwxr-xr-x 1 user group 1024 Jan 01 sword*
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...
# [combat sequence]
With the sword equipped, you should win. Health permitting, the guardian falls and the door to the Chamber opens.
💡 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 777on scripts or sensitive files. Use755for scripts and644for 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 | Bug in game version | Run ./setup.sh --repair |
✅ 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
./potionand./swordsuccessfully - The guardian is defeated and the Chamber door is open
➡️ Next Steps
- Continue main line → Chamber
- Explore other branches → Chapel · Vault · Scrap
- Back to hub → Bashcrawl Hub
📚 External Resources
Continue your terminal adventure with these resources:
- Bashcrawl Web Demo — Play in your browser, no installation required
- Bashcrawl on GitHub — Source code, setup, and open contributions
- GNU Bash Manual — Official Bash reference for brave heroes
- IT-Journey Bashcrawl Hub — Full quest series and walkthroughs
- chmod Calculator — Permission wizard for every adventurer
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
Referenced by
- Loading…