

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Users
incomplete
2: Whoami and sudo
incomplete
3: Permissions
incomplete
4: Changing Permissions
incomplete
5: Making a Script Executable
incomplete
6: Root User
incomplete
7: Chown
incomplete
8: Using sudo
incomplete
This lesson's interactive features are locked, please to keep using them
You'll frequently write your own scripts, or download them from the internet, only to find that they refuse to run:
$ ./conquerworld.sh
bash: ./conquerworld.sh: Permission denied
This happens all the time, and it trips people up constantly. The code is fine and the file is right there, but it's missing the execute permission. The fix is a one-liner: add the execute bit with chmod +x. I use chmod +x all the time as a developer.
Interactive example available with JavaScript enabled.
chmod +x conquerworld.sh
./conquerworld.sh
# it works!
The internet is a shady place. Only make executable (and run) scripts from publishers and authors you trust.
We just added execute permission to the genids.sh script in worldbanc/private/bin.
Paste the output of the script into the input field and submit your answer.