Unable to write to nagios.cmd

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jwelch
Posts: 225
Joined: Wed Sep 05, 2012 12:49 pm

Unable to write to nagios.cmd

Post by jwelch »

Nagios XI 2014R1.3 on RHEL 6

One of my users reported being unable to Acknowledge a service in the Nagios XI GUI.
I was able to reproduce the problem.

"Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!'

Looking at the nagios.cmd file, the permissions didn't seem right:

ls -l /usr/local/nagios/var/rw
-rw-r--r-- 1 root nagcmd 420 Jul 30 13:35 nagios.cmd
srw-rw---- 1 nagios nagcmd 0 Jul 30 12:00 nagios.qh

changing nagios.cmd from 644 to 664 fixed the symptom....but I don't know the cause.

Also, restarting nagios via '/etc/init.d/nagios restart' produced the following nagios.cmd file:
prw-rw---- 1 nagios nagcmd 0 Jul 30 13:52 nagios.cmd
which looks more like what I would expect.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Unable to write to nagios.cmd

Post by tmcdonald »

The ownership also looked a bit off. Here's mine:

Code: Select all

prw-rw---- 1 nagios nagcmd 0 Jul 30 11:42 /usr/local/nagios/var/rw/nagios.cmd
So yours looks correct now. Does anyone else have access to the system who may have changed the permissions? Did you have a power failure, run out of disk space, or otherwise experience any abnormal events recently?
Former Nagios employee
jwelch
Posts: 225
Joined: Wed Sep 05, 2012 12:49 pm

Re: Unable to write to nagios.cmd

Post by jwelch »

Wow...this is old. I forgot all about this one. No clue who/why the file changed. I may have done it when working on something else. In any case it's working and we can close this thread.
Sorry about the late response!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Unable to write to nagios.cmd

Post by slansing »

Well, thanks for getting back to us in any case!
Locked