I recently got this error while updating my system.
Error: Could not open command file ‘/usr/local/nagios/var/rw/nagios.cmd’ for update!
After messing up a bit with the file system, I found out that the permissions were not correct. You can set up the correct permissions using the following commands.
chcon -R -t httpd_sys_script_rw_t /usr/local/nagios/var/rw
Now run the update again. You’ll not get the error.
Another fix for the error is to edit the
/etc/group. In the terminal type the following:
Look for the values named
www-data in them. The values should look something like this:
nagios: x: 1003: nagios, www-data nagcmd: x: 1004: nagios, www-data
Now, restart Apache2.