Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed Netdisco, which is a perl based network discovery tool

When I run httpd from a terminal prompt as root, it works fine.

When I try and start Apache as a service (service httpd start), I get the following error(s):

Starting httpd: [Mon Apr 23 19:45:48 2012] [warn] module perl_module is already loaded, skipping
[Mon Apr 23 19:45:48 2012] [warn] module apreq_module is already loaded, skipping
Syntax error on line 22 of /etc/httpd/conf/netdisco_apache.conf:
Can't locate in @INC (@INC contains: /usr/local/netdisco /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 . /etc/httpd) at /etc/httpd/conf/netdisco_apache.conf line 26.\nBEGIN failed--compilation aborted\t(in cleanup) Can't locate in @INC (@INC contains: /usr/local/netdisco /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 . /etc/httpd) at /etc/httpd/conf/netdisco_apache.conf line 26.\nBEGIN failed--compilation aborted at /etc/httpd/conf/netdisco_apache.conf line 26.\n

I tried adding the apache user to the netdisco group netdisco, and got the same result. is definitely in the first folder in @INC (/usr/local/netdisco), and the netdisco user / group owns that folder and all files, including

Why won't it start?

share|improve this question
up vote 0 down vote accepted

Make sure that apache user has execute access to the /usr/local/netdisco folder and read access for the /usr/local/netdisco/ file.

You can also strace the startup of apache to find which files is trying to access. If those files exists it is a permission problem. Besides the Unix permissions you have to check the SELinux configuration.

share|improve this answer
Thanks for the answer, I do have a question: if the apache user is a member of the netdisco group, it gets all the permissions that the group has, correct? – Joon Apr 23 '12 at 18:17
Yes, it does, except SELinux ones. If SE linux is disabled or permisive, you can su as the apache user and try to see if you have access to the required file. – Mircea Vutcovici Apr 23 '12 at 18:22
Thanks Mircea, it is definitely permissions related. I can see this from the strace output: 5101 stat64("/usr/local/netdisco", 0x15aeeb0) = -1 EACCES (Permission denied) Now the question is, how do I configure the apache user to have access to /usr/local/netdisco? That folder is owned by the netdisco group, and the apache user is a member of that group. – Joon Apr 23 '12 at 18:27
If this does not help you have to relabel the folder. See:… and – Mircea Vutcovici Apr 23 '12 at 18:35
For security reasons you should keep SELinux. You can configure it to be enabled, but not enforced (permissive). This will allow you to test the changes and see if they are ok without disrupting the availability. Then when you have no more SELinux exceptions, you can enable it. – Mircea Vutcovici Apr 23 '12 at 18:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.