[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] running a perl cgi script as root on a RaQ3



Clive,

A technique that can be used here is for your CGI script to write a file
containing the submitted information. You then create a cron job as root
that runs say every minute and looks for this file, doing whatever it needs
and then erasing the file.

Cheers

Mike

At 11:04 PM 8/31/2000 -0700, you wrote:
>hey all
>
>thanks to the perl mongers out there for their one liners ;-)
>
>new problem.
>
>i have a cgi admin script that needs to amend conf files in different user
>directories.
>
>i think i'd like it to run as root (i know there are security issues, but
>here me out ;-)
>
>I'm restricting the script to:
>
>a single IP address ($ENV{'REMOTE_ADDR'}
>a particular (crypted) password
>particular input - all read by reg exp to satisfy -T
>
>if *anything* is amiss, the script kills itself with no explanation, so...
>
>I just tried to use a c wrapper to make it run as root - looked at:
>
>http://infoboard.com/infoboard/kbase/98-2-25-14745.htm
>
>but no joy, and 0.00 experience of c, so no idea why.
>
>Any suggestion on how to get this up so that user ABC in our office can run
>the script through their web browser on their site and amend these files?
>cgi-wrap is running. Is there any way this can help me? Hmmm.
>
>cLive ;-)
>
>PS - or if you can think of any other way to do this, that would be useful
>- trouble is, same file needs to be able to be updated by owner as well.
>
>PPS - another perl one liner (courtesy of Joseph Hall)
>
>$lowest = [ $a => $b ] [ $b <= $a ]
>
>(returns the lowest value of $a or $b).
>
>useful and very pretty - in a geeky-perl-type-thingy way :)
>
>- can also be written (not so prettily, but slightly more efficient) as
>($a,$b)[$b <= $a]
>
>cLive hoLLoway
>E-commerce Developer
>Now is the time to get trolleyed - www.get-trolleyed.co.uk
>
>print pack "H56", '4a75737420616e6f7468657220636f72706f726174652077686f7265';
>
>
>
>_______________________________________________
>cobalt-developers mailing list
>cobalt-developers@xxxxxxxxxxxxxxx
>http://list.cobalt.com/mailman/listinfo/cobalt-developers