You wrote a shell script called script.sh, perhaps to back up a database or regularly remove old files, and committed and pushed it to your Git repository. You go to your server, run git pull to get the latest commit, and try to execute the script with ./script.sh.
At some point, the script fails to run and displays the message Permission denied. No problem, you think. I’ll just change the file permissions with chmod. You do that, and the script runs. All is peachy—or so you think.