LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to run a shell script in the perl script (https://www.linuxquestions.org/questions/linux-general-1/how-to-run-a-shell-script-in-the-perl-script-447955/)

sharad 05-23-2006 11:54 PM

how to run a shell script in the perl script
 
hello,
I am trying to call a shell script through perl
script.my cgi file is as follows:

#!/usr/bin/perl -w
exec ("<shell script name>");

I am calling the cgi script through a link in the
web interface.

But the http log is showing following two error messages

1. Insecure $ENV{PATH} while running setuid at /var/www/cgi-
bin/deleteallsa.cgi line 2.
2. Premature end of script headers: /var/www/cgi-bin/
deleteallsa.cgi

where deleteallsa.cgi is the cgi file.

I also changed the permissions of both the cgi file
and shell scripts to 755 and set the UID.

Please help me to come out of this problem.

thnks in advance.

spirit receiver 05-24-2006 03:23 AM

This is explained in perlsec.


All times are GMT -5. The time now is 12:39 PM.