You are not logged in.
How do i make a script executable without adding the script to the PATH variable?
I have read in some articles that the only need for creating executable script is to use this:
chmod -x script.sh
But when im running like normal user with:
./script.sh
I get this:
bash: ./script.sh: Permission denied
Why?
Last edited by svanberg (2009-07-28 21:31:13)
Offline
I'm pretty sure that it's chmod +x, not chmod -x.
Offline
You're actually removing the executable flag.
"I'm Winston Wolfe. I solve problems."
~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~
Offline
Previous 2 posts are correct... "-x" means *remove* this permission, so you need to use "+x" to *add* this permission to the file.
`ls -l` will show you the permissions of the file after you've changed it to ensure you've got it right.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
.
Last edited by fumbles (2020-09-26 11:38:23)
Offline
I don't think you can set e.g. sticky bits with a number...
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Offline
Ok
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Okay, my fault. Thanks for your help.
chmod +x script.sh
Offline