Could not opencommandfile '/usr/local/nagios/var/rw/nagios.cmd'

Marc Powell marc at ena.com
Thu May 22 14:47:46 CEST 2008



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Daniel Bareiro
> Sent: Wednesday, May 21, 2008 8:16 PM
> To: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] Could not opencommandfile
> '/usr/local/nagios/var/rw/nagios.cmd'
> 
> On Sunday, 18 May 2008 22:53:03 -0500,
> Marc Powell wrote:


> > ... or just set nagios_group in nagios.cfg to be nagcmd...
> 
> I liked this simpleness. But after restarting the Nagios server, this
> doesn't work :-(

Interesting... smells buglish.

# grep nagios_group nagios.cfg
nagios_group=nagios

# ps -eo pid,user,rgroup,command | grep nagios

27347 nagios   nagios /usr/local/nagios/bin/nagios -d
/usr/local/nagios/etc/nagios.cfg

# vi nagios.cfg

# grep nagios_group nagios.cfg
nagios_group=nagcmd

# /etc/init.d/nagios restart
Running configuration check...done
Stopping network monitor: nagios
Waiting for nagios to exit . . done.
Starting network monitor: nagios

# ps -eo pid,user,rgroup,command | grep nagios

32016 nagios   nagcmd /usr/local/nagios/bin/nagios -d
/usr/local/nagios/etc/nagios.cfg

I see the change here -
-rw-rw-r--    1 nagios   nagcmd     829161 May 22 07:25 status.dat

But not here -
prw-rw----    1 nagios   nagios          0 May 22 07:26 nagios.cmd

I also see that in base/nagios.c that nagios drops privs to nagios_user
and nagios_group before calling open_command_file (which doesn't seem to
specify a specific group) so I would expect it to be group nagcmd.
Clearly I'm missing something. It's unintuitive behavior at the least
but it seems more than that IMHO. Can anyone test with a 3.x install?

--
Marc

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list