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) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
msg76684/pgp00000.pgp
Description: PGP signature