Hi Tom,
First of all due to the "risks" involved in doing something like this.. are you sure you need to do this as root ? Secondly, are you sure this script will not be accessible via an apache server ? (i.e this is not inside your document root?)

Your best bet is to use sudo (man sudo, man visudo).

I would suggest narrowing down the list of commands you want to run, and only allowing those commands in your sudoers line.

The man pages have lots of examples.



On Jul 26, 2005, at 5:28 PM, Tom Cruickshank wrote:

Hello,
I'm in the process of executing system commands using php. The only problem is that I am not entirely sure how to execute these system commands using
root user.
(I need root access to do a few things through php). Whenever I use the exec command it uses the www user. Would anyone know? Thanks for any assistance!

Tom


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to