Unable to write to command file



This was working for the last few months but , for some reason , nagios stopped running and upon a restart , i noticed that i cannot use the web interface to stop services etc .

[blockquote]Error: Could not open command file ‘/usr/local/nagios/var/rw/nagios.cmd’ for update!

The permissions on the external command file and/or directory may be incorrect. Read the FAQs on how to setup proper permissions. [/blockquote]

As far as I can see I have setup the permissions correctly

[blockquote]drwxrwsr-x 2 nagios nagiocmd 4096 Oct 13 09:54 rw


-rwxrwxr-- 1 nagios nagiocmd 0 Oct 13 09:56 nagios.cmd[/blockquote]

Does that look ok ?



Your permissions for nagios.cmd should be
since it’s a named pipe. Try stopping nagios, deleting your nagios.cmd file, and starting nagios again. this will allow nagios to recreate the file.
If this does not work, have a look at the documentation related to nagios.cmd: