In order to run a file as an executable, the "x'" (of "rwx" fame) must be set. To illustrate, if you
and you see something like:
rw-r--r-- <blah blah blah> <date> <size> somefile.sh
the regardless of whether you are root or not, you will get a "Permission denied" error because the file is not executable. To make it executable, just set the x bit high. To illustrate, assuming that you're root and you want to retain the other file permissions, you could run
Code:
chmod 744 somefile.sh
The result would then be:
rwxr--r-- <blah blah blah> <date> <size> somefile.sh
Note the executable bit has been set high.
This article gives a decent overview of file permissions. Good luck with it -- J.W.