I have a perl script that I fork from another script that I launch from a web browser via mod_perl. The forked script (which ends up running as apache) needs to
sudo service X stop as part of a backup restore process: the X service depends on the restore. I had this running OK on Windows, but now porting to CentOS I'm running into the error in the title.
- sudoers file has commented out
# Defaults requiretty
- sudoers file has
apache_usr localhost=(root) NOPASSWD: /sbin/service X stop(which passes a
visudo -ccheck) and has no other
Things I've tried:
sudo /sbin/serviceinstead of just
sudo servicein the forked process
- sudoers file with or without commenting out
- sudoers file with
(root)in the NOPASSWD line above
What else is there to try?