Problem in calling shell script from "CGI" Perl script
Problem in calling shell script from "CGI" Perl script :
1. We have a shell script which only does SCP (secure copy) of some files from one server to other. The shell script runs fine when run on its own.
2.It even runs fine when run through a normal perl file using "SYSTEM" command.
3.But the same shell script does not get executed when running through a CGI perl script.
4. We are running the script in the following way :
my $script = "/export/home/selva_v/intranet/cgi-bin/IR2BC/lib/BO/1.sh";
my $status = -1;
$status = system($script);
if( $status != 0 )
$log->debug("Execution NOT Completed.");
5. It gives as Execution NOT Completed. Note that the script runs fine on its own . So no errors in the shell script.
6.Even if we use a dummy shell script which just opens a file, then it gives Execution Completed. That means a file should be created, but the file is not getting created.
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.