Link to home
Start Free TrialLog in
Avatar of AIX25
AIX25Flag for United States of America

asked on

AIX - Sudo rule setup to start/stop apache

/usr/local/apache/ is the path of Apache. It is currently owned by root. Please help me setup a sudo rule to start and sotp apache for specific users.
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AIX25

ASKER

For example, I need to add about 3 users to be able to run this sudo rule, i.e. user1, user2, and user3, and then a seperate group called apacheapp. How would this look?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AIX25

ASKER

Ok, I will test it. What was the percent sign before the groupname for?
Avatar of AIX25

ASKER

I can still stop and start apache with no issues using root. But, when I "su - user1", and try to run /usr/local/bin/apachectl start....I get the following error:

servername:/home/user1> /usr/local/apache/bin/apachectl start
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
servername:/home/user1>
1) The Percent sign indicates a Unix Group, instead of a userid.

2) How should the shell know about sudo? In my first comment I already wrote that your users must run:

sudo /usr/local/....
Avatar of AIX25

ASKER

Oops, that is my mistake...I forgot to use sudo.
Don't worry! I saw this same mistake being made a hundred times here at EE ...