Can't execute created scripts.
|
Light Poster
|
|
| 6Jul2007,21:06 | #1 |
|
I created a new script (runThis) and included line: "$chmod +x runThis" then I save and quit, and type ./runThis into the shell, but it says that permission is denied.
|
|
Go4Expert Founder
|
![]() |
| 6Jul2007,22:19 | #2 |
|
I am not a *nix guy but you can see if you have the execute permission for the file you are trying to run.
Last edited by shabbir; 7Jul2007 at 10:53.. Reason: typo |
|
Go4Expert Member
|
|
| 6Jul2007,22:46 | #3 |
|
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 |
|
Light Poster
|
|
| 6Jul2007,23:47 | #4 |
|
I created the file, so I don't know why I wouldn't have permission. I also tried the sudo thing and it still says permission denied.
|
|
Go4Expert Member
|
|
| 7Jul2007,02:04 | #5 |
|
Right-click on the file and choose Properties or in a Terminal window open to the directory where the file is and type:
Code:
ls -la Also, as I said before, sudo will not work if you're not listed in the the /etc/sudoers file. What Linux distribution are you running? |

