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.
Unix OSApache Web Server

Avatar of undefined
Last Comment
woolmilkporc
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of AIX25
AIX25
Flag of United States of America image

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
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of AIX25
AIX25
Flag of United States of America image

ASKER

Ok, I will test it. What was the percent sign before the groupname for?
Avatar of AIX25
AIX25
Flag of United States of America image

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>
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

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
AIX25
Flag of United States of America image

ASKER

Oops, that is my mistake...I forgot to use sudo.
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Don't worry! I saw this same mistake being made a hundred times here at EE ...
Unix OS
Unix OS

Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.

33K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo