Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nagios / apache - permission problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Fri Nov 23, 2012 4:09 am    Post subject: nagios / apache - permission problem Reply with quote

I'm following standard "nagios" installation but I'm running into some permission problem.
I've followed standard installation procedure:
http://www.gentoo.org/doc/en/nagios-guide.xml

But I could not even login with password, so I transfered the authentication method from file:
/etc/nagios/auth.users

to:
/etc/apache2/users

and it worked, I can login but it seems to me the problem might be with my apache.
Nagios can not read any file in /etc/nagios directory. When I click on host (in nagios) I get:
Code:
Error: Could not open CGI config file '/etc/nagios/cgi.cfg' for reading!

I have cgi.cfg files installed with correct permission:
Code:
modules.d/99_nagios3.conf
<IfDefine NAGIOS>
   ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/
   <Directory "/usr/lib/nagios/cgi-bin/">
      AllowOverride AuthConfig
      Options ExecCGI
      Order allow,deny
      Allow from 127.0.0.1
   </Directory>
   Alias /nagios /usr/share/nagios/htdocs
   <Directory "/usr/share/nagios/htdocs">
      AllowOverride AuthConfig
      Order allow,deny
      Allow from 127.0.0.1
   </Directory>
</IfDefine>

Code:
ll /usr/lib/nagios/cgi-bin/
total 3292
-rwxr-xr-x 1 root root 238088 Nov 22 19:52 avail.cgi
-rwxr-xr-x 1 root root 238712 Nov 22 19:52 cmd.cgi
-rwxr-xr-x 1 root root 209336 Nov 22 19:52 config.cgi
-rwxr-xr-x 1 root root 254440 Nov 22 19:52 extinfo.cgi
...


So why apache can not read /etc/nagios/ directory?

My apache modules.d/00_default_settings.conf
Code:
...
<Directory />
   Options FollowSymLinks
   AllowOverride None
   Order deny,allow
   Deny from all
</Directory>

# added below
<Directory "/var/www/localhost/htdocs">
        AllowOverride All
        Order allow,deny
        Allow from all
</Directory>
...

but the above is not it. As I change the permission to
<Directory />
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

and it did not help.
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Fri Nov 23, 2012 4:36 am    Post subject: Reply with quote

Solved.
I think it is a bug in Gentoo nagios setup. Directory /etc/nagios should have a permission 775
Code:
drwxrwxr-x  3 nagios   nagios     4096 Nov 22 20:11 nagios
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum