LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 05-23-2006, 06:29 PM   #1
sbhupati
LQ Newbie
 
Registered: May 2006
Posts: 6

Rep: Reputation: 0
Unhappy Nagios Login Error


When trying to access the nagios apache web I am getting a forbidden error "You don't have pernmission to access /nagios on this server". The appache error log has the error "Permission denied: access to /nagios failed because search permissions are missing on a component of the path"..

Apache: 1.3.36
Nagios: 2.3.1

I have added both ScriptAlias and Alias to the httpd.conf file and restarted the web server.

ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/

<Directory "/usr/local/nagios/sbin">
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all
</Directory>

Alias /nagios /usr/local/nagios/share/
<Directory "/usr/local/nagios/share">
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>

I changed the permission on /usr/local/nagios/sbin and share to 777.

I used htpasswd to add the users. .htaccess file exists in sbin and share directories with 644 permissions. Entries in .htaccess are below:

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
require valid-user

Can somebody please help me.

Thanks in advance
 
Old 05-24-2006, 11:02 AM   #2
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
All the directories in the path "/usr/local/nagios/share" need read and execute permissions for the Apache user (usually "apache" or "nobody").

Get rid of the 777 permissions--you are asking for trouble when you make a directory world-writable. They only need to have read and execute permissions for the Apache user, nothing more. I don't think that the Apache user needs permissions to /usr/local/nagios/sbin--that should only be accessible to the nagios process, IIRC.

Try that and see what the result is.
 
Old 05-24-2006, 11:27 AM   #3
sbhupati
LQ Newbie
 
Registered: May 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Hello,

Thank you for your feedback.

Yes, I agree with you on the 777 permissions. I just assgined this for my testing. I changed the permissions on /usr/local/nagios/share to 755. But still no luck.
 
Old 05-24-2006, 11:54 AM   #4
sbhupati
LQ Newbie
 
Registered: May 2006
Posts: 6

Original Poster
Rep: Reputation: 0
I figured out the problem. The root nagios directory does not have the correct permissions. I changed it and it's all hunky dory now.

Thank you
 
Old 05-24-2006, 07:01 PM   #5
sbhupati
LQ Newbie
 
Registered: May 2006
Posts: 6

Original Poster
Rep: Reputation: 0
You know what it's not really Hunky Dory

I am able to login to Nagios. But when I tried to access the cgi-url stuff it is throwing an error:

Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster
Error 404

The apache error_log has the following error:
[Wed May 24 15:54:01 2006] [error] [client 172.22.71.228] script not found or unable to stat: /var/www/cgi-bin/nagios, referer: http://zph38.corp.google.com/nagios/side.html

Any help would be greatly appreciated.

Thank you
 
Old 05-25-2006, 08:22 AM   #6
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
The error is pretty clear from the log: /var/www/cgi-bin/nagios either does not exist or cannot be accessed. It looks to me like either your ScriptAlias or your server-wide DocumentRoot needs to be adjusted.

What is the URL you use to access Nagios?
 
Old 05-25-2006, 12:06 PM   #7
sbhupati
LQ Newbie
 
Registered: May 2006
Posts: 6

Original Poster
Rep: Reputation: 0
The url is http://zph38.corp.google.com/nagios/

Here is my script alias:

ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
<Directory "/usr/local/nagios/sbin">
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all
</Directory>


My DocumentRoot is pointing to "/var/www/html"
 
Old 05-26-2006, 11:49 AM   #8
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
Hmm. So, if "http://zph38.corp.google.com" = "/var/www/html", then "http://zph38.corp.google.com/nagios" is looking for "/var/www/html/nagios".

What are the contents of /var/www/html/nagios?
 
Old 06-01-2006, 07:21 PM   #9
sbhupati
LQ Newbie
 
Registered: May 2006
Posts: 6

Original Poster
Rep: Reputation: 0
I got it fixed for real this time:-)

Thank you for looking into this.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios web login error..... dwarf007 Linux - Software 33 01-27-2009 06:50 PM
Nagios monitoring panel error? dwarf007 Linux - Software 2 12-13-2005 01:02 PM
Nagios (403 Error) cuiguy Linux - Software 1 04-05-2005 07:27 PM
nagios error messages kenji1903 Linux - Networking 9 08-21-2004 06:07 AM
login problem nagios misba672 Linux - Newbie 2 10-14-2003 08:13 PM


All times are GMT -5. The time now is 09:58 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration