Re: Shell commands as root?

From: Date: Mon, 26 Aug 2002 09:59:09 +0000
Subject: Re: Shell commands as root?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-114123@lists.php.net to get a copy of this message
Nick -- ..and then Nick Price said... % % How can I get PHP to run a shell command as root? Thanks! If [apache running] php is running as root (bad), then just run the command. If the user running [apache running] php (typically "nobody" or "http" or "web" or such) has sudo permissions (generally bad), then use sudo. When all else fails (typically for a reason), you could just turn on the SUID bit on that command, or its wrapper script, and then just run it (also generally bad). Why do you want your web server to run a command as root? HTH & HAND :-D -- David T-G * It's easier to fight for one's principles (play) davidtg@justpickone.org * than to live up to them. -- fortune cookie (work) davidtgwork@justpickone.org http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

« previous php.general (#114123) next »