oops, I did it again…

When I reinstalled my monitoring VPS with Ubuntu 10.04 LTS and Nagios3, I got this annoying error message again:

Error: Could not stat() command file ‘/var/lib/nagios3/rw/nagios.cmd’!

In “/etc/nagios3/nagios.cfg” the “check_external_commands=1″ was already set. So there was something more required to make it run on Debian/Ubuntu…

Deep in my memory I know that there was a debian way to solve this user right related problem. This time I’ll write it down here, just as a reminder to myself, should I ever have to install it again.

/etc/init.d/nagios3 stop
dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw
dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3
/etc/init.d/nagios3 start

Ronny Roethof

Father, Nerd and Systems Engineer