RE: [PHP] How to execute script as root

From: Date: Tue, 28 Nov 2000 03:54:25 +0000
Subject: RE: [PHP] How to execute script as root
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-27541@lists.php.net to get a copy of this message
You are asking "how can you use exec()?" I hate to be blunt, but look at the manual. http://php.net/exec You should also make a group that ownes the file so that a member of that group can execute it. Setuiding it to root and changing the perms to 700 will still only allow root to execute it. I would chown it root.nobody, make sure that user nobody is in group nobody, then chmod it 4750. :) -jeremy brand Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: jeremy@nirvani.net http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more - - - - - - - - - - - - - - - - - - - - - - - - - "We're all Linux all the time, and very proud of it" Jim Reese, Chief Operations Engineer, Google.com On Tue, 28 Nov 2000, CHIU, Jonathan wrote: > Date: Tue, 28 Nov 2000 11:51:07 +0800 > From: "CHIU, Jonathan" <jonathan.chiu@hk.origin-it.com> > To: php-general@lists.php.net > Subject: RE: [PHP] How to execute script as root > > I have set it already and the file permission should be 700.... > > how can I use exec() or some other functions to execute it so that it will > run it as root? > > -----Original Message----- > From: jeremy brand [mailto:jeremy@nirvani.net] > Sent: Tuesday, November 28, 2000 11:46 AM > To: CHIU, Jonathan > Cc: php-general@lists.php.net > Subject: Re: [PHP] How to execute script as root > > > You could setuid root your binaries that you need to run as root. > > -jeremy brand > > Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: jeremy@nirvani.net > http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for > more > - - - - - - - - - - - - - - - - - - - - - - - - - > "We're all Linux all the time, and very proud of it" > Jim Reese, Chief Operations Engineer, Google.com > > > On Tue, 28 Nov 2000, CHIU, Jonathan wrote: > > > Date: Tue, 28 Nov 2000 11:44:24 +0800 > > From: "CHIU, Jonathan" <jonathan.chiu@hk.origin-it.com> > > To: php-general@lists.php.net > > Subject: [PHP] How to execute script as root > > > > Hi, > > > > I want to use our web-email client (written in php) to provide on-line > > account creation service which involves to execute a script to create user > > account in FreeBSD. I think exec() will not do the trick. Can anyone > give > > me some insights? > > > > Thanks. > > > > Jonathan > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#27541) next »