httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "amit khatri" <amitjkha...@hotmail.com>
Subject Re: running system commands using perl script on linux
Date Wed, 27 Feb 2002 12:56:46 GMT
I am running as a root and even the simple commands like "ll"

don't work.

At least it should give me the error messages for invalid commands.




>From: Pietro Cagnoni <pcagnoni@mclink.net>
>Reply-To: users@httpd.apache.org
>To: users@httpd.apache.org
>Subject: Re: running system commands using perl script on linux
>Date: Wed, 27 Feb 2002 13:20:01 +0100
>
>amit khatri wrote:
> >
> > I have written a perl script which accepts input from a html
> > page,and the job of the script is to execute what ever command is sent
> > to it from the html page.
> >
> >   I have used the post method to send the date, so the scrips reads
> > the input from STDIN.
> >
> > I execute the commands my placing them in the backquotes (`command`).
> >
> > eg. @ans=`ls`;
> >
> > I return the output in the form of html page to the client.
> >
> > Some of my commands are executed, but some do not.
> >
> > Commands that do not execute are
> >
> > 1> "ipchains -n -L"
> > 2> "netconf"
> >
> > ------------------------------------------------------------------
> > And also if i give an invalid command , i should get some error message
> > like "command not present". But I don't get them either.
> >
> > SHOULD I USE SOME MODULE LIKE "USE CGI" OR SOME OTHER.
>
>0) IT'S A VERY DANGEROUS THING TO DO. BE CAREFUL WITH YOUR NETWORK
>SECURITY.
>
>1) the commands you can't execute are probably in /sbin or /usr/sbin,
>which may be not in the script PATH.
>
>2) if apache doesn't run as root, the commands ipchains and netconf will
>probably fail anyway!
>
>pietro.
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>




_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message