|P is for Practical|
Scripts (mostly) doing nothing when run from command line.by graq (Curate)
|on Jan 06, 2007 at 19:49 UTC||Need Help??|
graq has asked for the
wisdom of the Perl Monks concerning the following question:
The perl scipts on my RedHat FC4 box are behaving strangely (as far as I can tell). The scripts error when run via the browser: Can't open perl script "/dir/script.pl": Permission denied
I've ensured that the permissions are correct (to the point of recursively chmodding everything in /var/www to world read and execute).
I created a small Hello World script (double checking that the shebang line was correct) in the cgi-bin directory - with the same problems. I ran the HW script from the command line with the syntax perl helloworld.pl (which worked) and then ran it with the syntax ./helloworld.pl (which did not work). The second syntax had an effect as if I just hit the return key - it did nothing.
I then copied the script to my home directory and tried both syntaxes - they both worked. I then created helloworld2.pl and tried to replicate this behaviour, but, sadly, this script did not work using the second syntax from my home directory.
I'm stumped. I've pasted my experience below.
EDIT 1: Specifically, all the scripts *are* executable.
-=( Graq )=-