Does anyone know how I can allow an SSH user to execute some functions such as restarting httpd?

I'm trying to allow a user (apache) to execute some functions such as "service httpd reload" since it's not allowed. I don't really want to give apache root access, just some functions.

link|improve this question
You might want to take a look at my answer here: stackoverflow.com/questions/6811878/php-exec-issue/… – nmat Jul 26 '11 at 4:22
feedback

migrated from stackoverflow.com Jul 26 '11 at 2:38

This question came from our site for professional and enthusiast programmers.

1 Answer

sudo. You can configure specific commands a user is allowed to execute in /etc/sudoers. Be careful when authorizing a user to run commands as root; it's easy to accidentally allow them to do more than you intended.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown