shell_exec sudo problem

Paul paul at theharbour.eclipse.co.uk
Sat Feb 19 18:50:25 GMT 2005


For some reason I can't get sudo to work from an online php script using
shell_exec.

 

I have put this in the sudoers file: 

www     ALL=(ALL) ALL

(full access is temporary until I get it working)

 

When I run:

echo shell_exec("sudo echo hello");

 

in a php script in a web page running on apache2, it does nothing - I don't
get any feedback.

 

 

echo shell_exec("whoami"); confirms that www is the correct user.

 

 

Any ideas?

 

Paul



More information about the freebsd-questions mailing list