Page 1 of 1

incorrect file permissions

Posted: Mon May 15, 2017 8:28 am
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.

Re: incorrect file permissions

Posted: Mon May 15, 2017 11:04 am
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.

Re: incorrect file permissions

Posted: Tue May 16, 2017 4:29 am
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.

Re: incorrect file permissions

Posted: Tue May 16, 2017 12:23 pm
by tgriep
Nagios XI needs to have selinux disabled to run correctly so it has to be disabled for XI to function.