Boot2Root / Command Mistakes & Recovery
bash: Permission denied running a downloaded script
1. Error or symptom
./script.sh returns 'Permission denied' even though the file exists.
2. Likely cause
The file lacks the execute bit after being transferred/downloaded.
3. How to verify
ls -la script.sh — check the permission string (e.g. -rw-r--r--, no x).
4. Correct command
chmod +x script.sh && ./script.sh
5. Recovery procedure
Re-run after setting the execute bit.
6. How to avoid repeating it
chmod +x immediately after any file transfer onto a target, before trying to run it.