A couple of things to look for:
Are you the owner of the file you are trying to chmod, or running as root/sudo?
If the user that is trying to change the permission
doesn't have enough permissions to change the permissions (deep breathe) you will get a permission denied message.
So, you will have to run the script as either root or sudo, or add sudo to the script like this:
Code:
sudo chmod +x runThis
Now the user running the script will be prompted for their password (they will have to be listed in the /etc/sudoers file) and if they enter it the script will run the command. If not, or if they are not in the sudoers file, they will receive a permission denied message.