Ups, I did it again – when I upgraded to Debian GNU/Linux 5 (lenny) and Nagios3 I stumbled about this nagios error when I try to send directs commands via the web-interface:
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…
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 – perhaps I’ll find it more easily when I upgrade to Debian GNU/Linux 6.0 (codenamed squeeze) and/or Nagios4.
/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
Good note.. I found this page as I was having the same feeling about how to fix this. Just one correction though.. the two command switches require 2 dashes not one. ie –update –add
Heya Lars, thnx a million 4 sharin’ this. Got it goin’ ;c)
Metta Mudita
Thanks Lars, this is a really great tip.
Watch out for copy-and-paste fail. The –update and –add above does not actually have two – characters.
Thanks so much for the post it really help me so much. i added you on my twitter.
Very nice!!! I wish all the problems of nagios could be fixed that easily! great write up!