Operating System - Linux
1755937 Members
4362 Online
108839 Solutions
New Discussion

Problem Starting apache httpd using sudo

 
Craig Johnson_1
Regular Advisor

Problem Starting apache httpd using sudo

I have a very strange issue.  I can't start the (IBM IHS) apache/httpd on one RHEL 6.2 machine (VM running on HP hardware) IF I use sudo.

 

Now, I know you can't bind to ports < 1024 without root privs. So I configured sudo like I always do so allow users to run "[path]/bin/apachectl" via sudo.  This works fine on two other supposedly identical machines, but here. 

 

So, out of curiousity, I changed it to listen on port 8080.   Now, this is truly odd:

 

 

[ajohnsce@a300s706 ~]$ /ihs/ihs8-80/bin/apachectl start

[ajohnsce@a300s706 ~]$ ps -ef | grep http

ajohnsce 21095     1  0 14:20 ?        00:00:00 /ihs/ihs8-80/bin/httpd -d /ihs/ihs8-80 -k start

ajohnsce 21096 21095  0 14:20 ?        00:00:00 /ihs/ihs8-80/bin/httpd -d /ihs/ihs8-80 -k start

ajohnsce 21097 21095  0 14:20 ?        00:00:00 /ihs/ihs8-80/bin/httpd -d /ihs/ihs8-80 -k start

ajohnsce 21098 21095  0 14:20 ?        00:00:00 /ihs/ihs8-80/bin/httpd -d /ihs/ihs8-80 -k start

ajohnsce 21129 21059  0 14:20 pts/0    00:00:00 grep http

[ajohnsce@a300s706 ~]$ /ihs/ihs8-80/bin/apachectl stop

[ajohnsce@a300s706 ~]$ ps -ef | grep http

ajohnsce 21139 21059  0 14:21 pts/0    00:00:00 grep http

[ajohnsce@a300s706 ~]$ sudo /ihs/ihs8-80/bin/apachectl start

[ajohnsce@a300s706 ~]$ ps -ef | grep http

ajohnsce 21171 21059  0 14:21 pts/0    00:00:00 grep http

 

Why would this NOT work with sudo but work fine without it? 

 

I have doubled checked my sudo setup, it is identical to the other machines where this works (on either port).  I even reinstalled the sudo rpm. 

 

Help.

 

 

1 REPLY 1
Jimmy Vance
HPE Pro

Re: Problem Starting apache httpd using sudo

my first thought would be, possibly selinux rearing it ugly head.

No support by private messages. Please ask the forum!