Error: Could not open command file nagios.cmd for update! Nagios

I was totally new to Nagios ;), the installation process took me a few hours to finish. My server uses Ubuntu 16.04 LTS and Nginx, Nagios 4.

Finally i could get Nagios up and running but when i tried to update or re schedule some checks it didn't work. Nagios was showing this error and let me know that something was not right with the permissions:

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

Here is how i fixed my problem, just run these commands as sudo:

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

Hope this helps!

Written on 29 November 2018

Share your thoughts