Symptoms

Permission denied
bash: ./script.sh: Permission denied

Cause 1: Missing Execute Permission

chmod +x script.sh
./script.sh

Cause 2: Requires Root Privileges

sudo your-command

Cause 3: Wrong File Owner

sudo chown username:groupname filename

chmod Quick Reference

chmod 755 file    # Owner: rwx, Others: r-x
chmod 644 file    # Owner: rw-, Others: r--
chmod +x file     # Add execute permission