LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 05-24-2006, 12:54 AM   #1
sharad
Member
 
Registered: Dec 2005
Posts: 48

Rep: Reputation: 15
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.
 
Old 05-24-2006, 04:23 AM   #2
spirit receiver
Member
 
Registered: May 2006
Location: Frankfurt, Germany
Distribution: SUSE 10.2
Posts: 424

Rep: Reputation: 33
This is explained in perlsec.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script to run pl/sql script. colly Linux - General 1 09-09-2004 07:49 AM
Shell Script, C, C++, or Perl ? mrpc_cambodia Programming 5 08-12-2004 11:18 AM
how to find the pid of a perl script from shell script toovato Linux - General 1 12-19-2003 07:25 PM
How to run a perl script as a daemon ? paonethestar Programming 17 11-06-2003 09:53 PM
can't get perl script to run from www victorus Linux - General 0 03-27-2001 06:32 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration