I’ve just installed Icinga 1.6x on a Ubuntu Box and was faced again with this annoying error:
Error: Could not stat() command file ‘/var/lib/icinga/rw/icinga.cmd’!
I’ve played around with chmod, chown, chgrp and with the icinga and apache user. Finally i figured out, that it could be a error in the ubuntu package. This solved the error, even if you restart the service:
service icinga stop dpkg-statoverride --update --add nagios www-data 2710 /var/lib/icinga/rw/ dpkg-statoverride --update --add nagios nagios 751 /var/lib/icinga/ service icinga start