[Pkg-nagios-devel] Bug#291351: nagios-text: CGI interface displays no data, but nagios functioning correctly

Steve Greenland Steve Greenland <steveg@lsli.com>, 291351@bugs.debian.org
Tue, 1 Feb 2005 16:41:18 -0600


I think I've found the cause of this, and a temporary fix.

I ran into the same problem today when I switched from nagios-mysql
to nagios-text. Switching back didn't help, but when I was running
reportbug, I noticed that the debconf entry for apache was "None". I'd
already checked apache/conf.d/nagios, but I figured what the hell,
and ran dpkg-reconfigure on nagios-common, set it back to "Both", and
yep,that fixed it. (Actually, it would more correct to say "the nagios
cgi's started working"). Cool, thought I, and tried to go nagios-text
again. Nope, broken. Back to -mysql. Still broken. Hmm, debconf entry
still "both". Hmmmrmrmrm. Run dpkg-reconfigure *again*, just hitting
enter all the way through. Fixes it again, even though I didn't change
any values. Oh, crap, it's because it's setting the cgis suid nagios.

So, clearly, it's because some vital bit of info is unreadable by user
'www-data', but not 'nagios'. Or, possibly, they need to be able to
*write* somewhere that isn't obviously documented. I've not yet tracked
this down, but if I figure it out, I'll add to this bug report.

Now I'm off to report the bug about not using dpkg-statoverride so that
the setuidness isn't lost on upgrades!


Steve

-- 
"Outlook not so good." That magic 8-ball knows everything! I'll ask
about Exchange Server next.
                           -- (Stolen from the net)