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.

Hello! Can you, please, help me submit my article? I can't do it myself because there's an error that occurred when I tried to do that. It is said that it was spam or an ad. How can I post the article? Thank you in advance.