Page 3 of 4

Re: You don't have permission to access /nagios/ on this ser

Posted: Mon Jan 16, 2017 5:42 pm
by rkennedy
Could you please upload it? I'm not seeing anything attached in the post.

Re: You don't have permission to access /nagios/ on this ser

Posted: Mon Jan 16, 2017 7:18 pm
by sachinambardekar
Uploaded file in zip format.

Thank you,
Sachin A

Re: You don't have permission to access /nagios/ on this ser

Posted: Tue Jan 17, 2017 12:31 pm
by tgriep
What OS and version did you install Nagios Core on?
Can you login to the Nagios server as root, run the following commands and port the output?

Code: Select all

chage -l nagios
grep nag /etc/group
grep nag /etc/passwd
ls -lR /usr/local/nagios/etc
It could be a permission issue causing the error that you are having and the above will help to narrow down the issue.

Re: You don't have permission to access /nagios/ on this ser

Posted: Tue Jan 17, 2017 6:21 pm
by sachinambardekar
[root@hdputils ~]# cat /etc/oracle-release
Oracle Linux Server release 6.8

[root@hdputils ~]# chage -l nagios
Last password change : Jan 14, 2017
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7

[root@hdputils ~]# grep nag /etc/group
nagios:x:500:apache

[root@hdputils ~]# grep nag /etc/passwd
nagios:x:500:500::/home/nagios:/bin/bash

[root@hdputils ~]# ls -lR /usr/local/nagios/etc
/usr/local/nagios/etc:
total 88
-rw-rw-r-- 1 nagios nagios 12744 Jan 14 11:25 cgi.cfg
-rw-r--r-- 1 root root 12744 Jan 14 11:59 cgi.cfg.orig
-rw-r--r-- 1 root root 26 Jan 14 11:31 htpasswd.users
-rw-rw-r-- 1 nagios nagios 44831 Jan 14 11:25 nagios.cfg
drwxrwxr-x 2 nagios nagios 4096 Jan 14 16:16 objects
-rw-rw---- 1 nagios nagios 1312 Jan 14 11:25 resource.cfg

/usr/local/nagios/etc/objects:
total 48
-rw-rw-r-- 1 nagios nagios 7688 Jan 14 11:25 commands.cfg
-rw-rw-r-- 1 nagios nagios 2138 Jan 14 11:25 contacts.cfg
-rw-rw-r-- 1 nagios nagios 5379 Jan 14 11:25 localhost.cfg
-rw-rw-r-- 1 nagios nagios 3096 Jan 14 11:25 printer.cfg
-rw-rw-r-- 1 nagios nagios 3265 Jan 14 11:25 switch.cfg
-rw-rw-r-- 1 nagios nagios 10621 Jan 14 11:25 templates.cfg
-rw-rw-r-- 1 nagios nagios 3180 Jan 14 11:25 timeperiods.cfg
-rw-rw-r-- 1 nagios nagios 3991 Jan 14 11:25 windows.cfg


Please advise.

Thank you,
Sachin A

Re: You don't have permission to access /nagios/ on this ser

Posted: Wed Jan 18, 2017 12:10 pm
by tgriep
Those settings look good, can you run the following as root on the server and upload the /tmp/ls.txt file to this post?

Code: Select all

ls -lR /usr/local/nagios >/tmp/ls.txt
Can you post this file as well?

Code: Select all

/etc/httpd/conf.d/nagios.conf

Re: You don't have permission to access /nagios/ on this ser

Posted: Wed Jan 18, 2017 4:42 pm
by sachinambardekar
Uploaded requested output files.

Re: You don't have permission to access /nagios/ on this ser

Posted: Wed Jan 18, 2017 5:48 pm
by tgriep
Can you run the following commands as root and post the output?

Code: Select all

ip addr
cat /etc/hosts
hostname -a
ps -ef
Do you see any errors in the /var/log/httpd/error_log file while you try and access the Nagios Menus?

Re: You don't have permission to access /nagios/ on this ser

Posted: Wed Jan 18, 2017 9:14 pm
by sachinambardekar
Uploaded requested output from the command in a txt file as well as error_log file from /var/log/httpd/ in a zip format.

Please advise.

Thank you,
Sachin A

Re: You don't have permission to access /nagios/ on this ser

Posted: Thu Jan 19, 2017 12:24 pm
by tgriep
Thanks for the files.
From what I can see,all of the settings and permissions are correct and you should be able to see the status information.
The only thing left that hasn't been checked it the nagiosadmin account that is setup in the htpasswd file.

Code: Select all

/usr/local/nagios/etc/htpasswd.users
Try recreating the account and see if you can view the data in the GUI.

Re: You don't have permission to access /nagios/ on this ser

Posted: Thu Jan 19, 2017 1:26 pm
by sachinambardekar
Support,

I can login to Nagios UI using nagiosadmin user successfully, however, as per https://support.nagios.com/kb/article.p ... ategory=58 , under Test Plugins section, I don't see "Commands menu" to "Re-schedule the next check" I am again attaching the error screenshot for your review.

[root@hdputils ~]# ls -ltr /usr/local/nagios/etc/htpasswd.users
-rw-r--r-- 1 root root 26 Jan 14 11:31 /usr/local/nagios/etc/htpasswd.users
[root@hdputils ~]#

Please advise.

Thank you,
Sachin A