Home » Software Applications » Nagios » Error: Could not open command file ‘/usr/local/nagios/var/rw/nagios.cmd’ for update!

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

If you’re updating nagios, and/or you are trying to reschedule checks manually, and you get the error below:

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

Then it means that the permissions on the folder are messed up. Don’t bother setting up the permissions on the file itself, nagios.cmd,  since that file gets recreated very often, so:

chown nagios.nagcmd /usr/local/nagios/var/rw 
chmod g+rwx /usr/local/nagios/var/rw 
chmod g+s /usr/local/nagios/var/rw

This should get you up and running without problems.

Originally posted 2016-03-01 00:43:51.

About admin

I have been working with Linux based systems since 2002. I hope the article published on this site will be useful to those new to server administration.