apache restart for sudoer-user

Oliver Etzel - GoodnGo.COM (R) oliver at goodngo.com
Mon Oct 7 10:01:39 EDT 2002


Hello list,

I want that my user "frutz" can restart apache server without being root.

My /etc/sudoer is configured as follows:

# /etc/sudoer
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
# Host alias specification
Host_Alias SERVER = frutz23
# User alias specification
User_Alias WEBBIES = frutz,servicer
# Cmnd alias specification
Cmnd_Alias WEBSTART = /usr/local/apache/bin/apachectl start
Cmnd_Alias WEBSTOP  = /usr/local/apache/bin/apachectl stop
Cmnd_Alias SERVICE  = /sbin/service
# Defaults specification
# User privilege specification
root    ALL=(ALL) ALL
WEBBIES SERVER=WEBSTART
WEBBIES SERVER=WEBSTOP
WEBBIES SERVER=SERVICE

What happened here?

User frutz can start the apache via apachectl, but
followed by the folloeing error message:

/usr/local/apache/bin/apachectl restart
/usr/local/apache/bin/apachectl restart: httpd not running, trying to start
fopen: Permission denied
httpd: could not open error log file /usr/local/apache/logs/error_log.
/usr/local/apache/bin/apachectl restart: httpd could not be started

How I have to configure /etc/sudoers  so that user frutz can restart the
apache server gracefully?

Hope for help
Yours,

Oliver Etzel
lowprice serverhousing www.t-host.com
-----------------------------------------------------



More information about the sudo-users mailing list