Link to home
Start Free TrialLog in
Avatar of rqs
rqs

asked on

bash: ./script_name: No such file or directory (cheail, u there?)

This question is related to this one:
https://www.experts-exchange.com/questions/21114579/Bash-script-name-Permission-denied.html

The script being referred to initially won't run because the partition
on which the script was saved in did not have the exec setting enabled.

I turned the exec setting on, mounted and unmounted the file.
The funny thing is other scripts existing in the same directory can be
run successfully by bash while some cannot:

I run ./somescript.pl
the script runs successfully

I run ./anotherscript.pl, the shell returns
bash: ./anotherscript.pl: No such file or directory

If I run perl ./anotherscript.pl, the script runs successfully, so there seems to be nothing wrong with
the script.

I must be able to run the script directly from the shell since they are part of a cgi application
If I can't, httpd won't also and my cgi app wont run (error_log file also shows the same
error when calling the cgi script: No such file or directory)

Cheail, if your there, maybe you can also help me out on this one. =)
Thanks guys


Avatar of Mysidia
Mysidia
Flag of United States of America image

Check the contents of the script, look at the first line... make sure it looks like

#!/usr/bin/perl

and the path to the interpreter is correct
Avatar of rqs
rqs

ASKER

the script already refers to the correct path of the perl executable,
this is not the problem in this case but something else.


ASKER CERTIFIED SOLUTION
Avatar of ramazanyich
ramazanyich
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rqs

ASKER

Thanks guys. That did it. The files were modified on my Win32 desktop before
moving it to the Linux server.

Thanks again =)