I have a problem with the configuration files on Nagios XI. I set /usr/local/nagios/* to nagios:nagios 755 and everything looks ok. After make any change on the configuration and apply the configuration changes, some of the /etc/.cfg files are going back to nagios:user and the write conf files tool is failing with writing permission. Help!
Ileana
-rwxrwxr-x 1 nagios users 744 Jan 11 10:14 cgi.cfg
-rwxrwxr-x 1 nagios users 14771 Feb 16 15:35 commands.cfg
-rwxrwxr-x 1 nagios users 1113 Feb 16 15:35 contactgroups.cfg
-rwxrwxr-x 1 nagios users 1612 Feb 16 15:35 contacts.cfg
-rwxrwxr-x 1 nagios users 1437 Feb 16 15:35 contacttemplates.cfg
-rwxrwxr-x 1 nagios users 662 Feb 16 15:35 hostdependencies.cfg
-rwxrwxr-x 1 nagios users 664 Feb 16 15:35 hostescalations.cfg
-rwxrwxr-x 1 nagios users 682 Feb 16 15:35 hostextinfo.cfg
-rwxrwxr-x 1 nagios users 990 Feb 16 15:35 hostgroups.cfg
drwxrwxr-x 2 nagios nagios 4096 Feb 16 14:27 hosts
-rwxrwxr-x 1 nagios users 6101 Feb 16 15:35 hosttemplates.cfg
drwxrwxr-x 2 nagios nagios 4096 Feb 15 16:23 import
-rwxrwxr-x 1 nagios users 5714 Feb 15 16:23 nagios.cfg
-rwxrwxr-x 1 nagios users 2229 Jan 11 10:16 ndo2db.cfg
-rwxrwxr-x 1 nagios users 4723 Jan 11 10:16 ndomod.cfg
-rwxrwxr-x 1 nagios users 7207 Jan 11 10:16 nrpe.cfg
-rwxrwxr-x 1 nagios users 5345 Jan 11 10:16 nsca.cfg
drwxrwxr-x 4 nagios nagios 4096 Jan 11 10:16 pnp
-rwxrwxr-x 1 nagios users 210 Jan 11 10:14 resource.cfg
/usr/local/nagios/etc conf files permission
Re: /usr/local/nagios/etc conf files permission
I had the same problelm. I find the at times I need to run this command. then you can save the config again.
chown apache.nagios /usr/local/nagios/etc/*.cfg
chown apache.nagios /usr/local/nagios/etc/*.cfg
Re: /usr/local/nagios/etc conf files permission
I have to do this every time I make a change to a host or service configuration when using nagios core. Then I write to the files and everything comes back normal again but when I go back to view the hosts or services anything I had just changed shows an Out of Sync status again. Not sure why I have to do this any time I edit a service our host config file. It's quite annoying.
Re: /usr/local/nagios/etc conf files permission
I'm having the same issue. The .cfg files keep reverting back to nagios:nagios and I keep having to chown them to apache:nagios.
Re: /usr/local/nagios/etc conf files permission
Some of these issues have be discussed on another thread.
http://support.nagios.com/forum/viewtop ... p=506#p506
Try this solution forwarded from one of our tech team members.
chown -R nagios.nagios /usr/local/nagios/etc
find /usr/local/nagios/etc -type d -exec chmod 775 '{}' + -o\
-type f -exec chmod 664 '{}' +
http://support.nagios.com/forum/viewtop ... p=506#p506
Try this solution forwarded from one of our tech team members.
chown -R nagios.nagios /usr/local/nagios/etc
find /usr/local/nagios/etc -type d -exec chmod 775 '{}' + -o\
-type f -exec chmod 664 '{}' +
Re: /usr/local/nagios/etc conf files permission
Lets see what happens
I just ran the commands.
Re: /usr/local/nagios/etc conf files permission
Ok, when we have an error of some sort and the process rolls back, it appears that the permissions get rolled back to nagios:users. However, that permissions changing script works great otherwise.
Re: /usr/local/nagios/etc conf files permission
Yeah, that's something we'll probably have to figure out in future editions, but in the meantime I'm glad that script worked out.
Re: /usr/local/nagios/etc conf files permission
What version of NagiosXI?
This should accentually be an obsolete method, replaced by code that was less-likely to change the permissions.
This should accentually be an obsolete method, replaced by code that was less-likely to change the permissions.
Re: /usr/local/nagios/etc conf files permission
Nagios XI 2009R1.2
It's still a problem. I think there's still some remnants of code that causes permissions problems somewhere. It's happened enough here that I've had to implement a cron job to fix permissions.
It's still a problem. I think there's still some remnants of code that causes permissions problems somewhere. It's happened enough here that I've had to implement a cron job to fix permissions.