incorrect file permissions

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
pratik.patel
Posts: 77
Joined: Wed Apr 19, 2017 10:51 am

incorrect file permissions

Post by pratik.patel »

all my files have the correct permissions but then also nagioxi gui says:
The following configuration files have incorrect permissions:
/usr/local/nagios/etc/commands.cfg (OWNER=root, GROUP=root, PERMS=-rw-rw-r--)
/usr/local/nagios/etc/contactgroups.cfg (OWNER=root, GROUP=root, PERMS=-rw-rw-r--)
/usr/local/nagios/etc/contacts.cfg (OWNER=root, GROUP=root, PERMS=-rw-rw-r--)
/usr/local/nagios/etc/contacttemplates.cfg (OWNER=root, GROUP=root, PERMS=-rw-rw-r--)
/usr/local/nagios/etc/hostdependencies.cfg (OWNER=root, GROUP=root, PERMS=-rw-rw-r--)
/usr/local/nagios/etc/hostescalations.cfg (OWNER=root, GROUP=root, PERMS=-rw-rw-r--)
/usr/local/nagios/etc/hostextinfo.cfg (OWNER=root, GROUP=root, PERMS=-rw-rw-r--)
/usr/local/nagios/etc/hostgroups.cfg (OWNER=root, GROUP=root, PERMS=-rw-rw-r--)
/usr/local/nagios/etc/hosttemplates.cfg (OWNER=root, GROUP=root, PERMS=-rw-rw-r--)
/usr/local/nagios/etc/servicedependencies.cfg (OWNER=root, GROUP=root, PERMS=-rw-rw-r--)
/usr/local/nagios/etc/serviceescalations.cfg (OWNER=root, GROUP=root, PERMS=-rw-rw-r--)
/usr/local/nagios/etc/serviceextinfo.cfg (OWNER=root, GROUP=root, PERMS=-rw-rw-r--)
/usr/local/nagios/etc/servicegroups.cfg (OWNER=root, GROUP=root, PERMS=-rw-rw-r--)
/usr/local/nagios/etc/servicetemplates.cfg (OWNER=root, GROUP=root, PERMS=-rw-rw-r--)
/usr/local/nagios/etc/timeperiods.cfg (OWNER=root, GROUP=root, PERMS=-rw-rw-r--)
Each of these config files needs to be writable by the apache and nagios users. To fix this problem, follow these steps:
Login to your Nagios XI server via SSH as the root user
Execute the following commands:
/usr/local/nagiosxi/scripts/reset_config_perms.sh

All permissions are same but then also I run this command but still the message is not going from GUI.
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: incorrect file permissions

Post by tgriep »

Try restarting the Nagios and Apache process to see if the message in the GUI gets resolved.
Login to the Nagios server as root and run the following commands.

Code: Select all

service nagios stop
killall -9 nagios
service httpd restart
service nagios start
Wait a few minutes and relogin to the XI GUI and see if the error is gone.
Be sure to check out our Knowledgebase for helpful articles and solutions!
pratik.patel
Posts: 77
Joined: Wed Apr 19, 2017 10:51 am

Re: incorrect file permissions

Post by pratik.patel »

Still I am able to see the errors.
When I set selinux in permissive mode the errors are gone.

again its the nagiosxi issue with selinux.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: incorrect file permissions

Post by tgriep »

Nagios XI needs to have selinux disabled to run correctly so it has to be disabled for XI to function.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked