Re: is their a way to run a command as root ???

From: Date: Wed, 24 Apr 2002 15:07:20 +0000
Subject: Re: is their a way to run a command as root ???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-94390@lists.php.net to get a copy of this message
check your manpages on chroot and sticky bits... This should help you out... Ray Hunter "Scott Baer" <baerrs@hotmail.com> wrote in message news:20020424133434.79777.qmail@pb1.pair.com... > Is their a way to run a command as root..or another user.. > > I know their are a log of security issues with allowing this.. I will > tighten down security after I get it to work. > > He is what I am trying to do. > I have squid & squid guard set up.. > > in squids redirect url.. (on the same box).. I would like to modify a > checked/domain list (I'm currently doing this manually... though I think I > know how to do this ..or at least the book I have does.) after it is > modified I need to run the fallowing... > > --update-- > #!/bin/sh > ./squidguard -C all #or a specific db.. but all covers... all > /etc/init.d/squid restart > > I can run this as root or as squid.. > > I did create a test script which just copied some files in the /tmp dir.. > --test-- > #!/bin/sh > echo "this is a test" > cp /usr/local/httpd/htdocs/Block.html /tmp/Block.html > > I can run this.. and it works with the fallowing.... > > <?php > $command="./test"; > system($command); > ?> > > > >

« previous php.general (#94390) next »