Hi all, suppose I want to let apache run a script that will shut down the server.
In my attempt to pull this off, I've done the following:
added the following to sudoers: ALL ALL=NOPASSWD: /home/site/public_html/theScript.sh apache ALL=NOPASSWD: /sbin/shutdown now
chmod 4777 theScript.sh
created a php page that call the script
The script works and the php page calls it, but when it's called from a web site, it doesn't actually shut down the machine.
What did I forget?