OT - cgi help - followup

From: Laurence Moughan (Laurence.Moughan@aerlingus.com)
Date: Thu Aug 12 2004 - 08:53:55 EDT


Ok scripts is running and im generating an output file with the
scripts,

#!/bin/sh
echo "Content-Type: text/html\n"
echo
echo
echo "<TT><PRE>\n"
su - explorer -c "ssh obemlv /usr/local/sbin/postqueue -p"
>/tmp/mailq
cat /tmp/mailq
echo "\n</PRE></TT>\n"
echo

however my /tmp/mailq output is zero - and its due to the fact the cgi
is run by the apache user

see error log,

Thu Aug 12 13:46:04 2004] [error] [client 10.137.19.135] su: Sorry
[Thu Aug 12 13:46:33 2004] [error] [client 10.137.19.135] su: Sorry
[Thu Aug 12 13:48:02 2004] [error] [client 10.137.19.135] su: Sorry

Anyway i can get over this ? ( apache server being run by apache user -
can my cgi be run by other accounts ? - this an apache httpd.conf
setting ?

Thanks

laurence

............................

Hi,

OT i know - but please advise mail list or if you know answer !

Basically - i need to run a script cgi via browser,

running apache server on sol8

wish to run followin from cgi-bin,

#!/bin/sh
echo "content-type: text/plain"
echo `su - explorer -c "ssh obemlv /usr/local/sbin/postqueue -p"`

Or somethinng that will run the command and stdout to screen,

or

#!/bin/sh
echo "content-type: text/plain"
su - explorer -c "ssh obemlv /usr/local/sbin/postqueue -p"
>/tmp/mailq
echo
echo "Have a nice day"
echo "/tmp/mailq"

cannot seem to get command to run, or get an echo of a file to read the
file !

out puts i get are

::::::::::::::
/tmp/mailq
::::::::::::::

Any clues ?

anything is appreciated

Thanks

Laurence

For low fares and great deals on hotels, car hire and travel insurance visit http://www.aerlingus.com
of any action in reliance upon, this information by persons or entities
other than the intended recipient is prohibited.If you have received
this email in error please notify the sender immediately and delete
the material.
*******************************************************************************
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:29:16 EDT