Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 May 2012 09:59:58 GMT
From:      Yar Tikhiy <yar@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/168225: net-mgmt/nrpe2 : wrong owner of spool dir
Message-ID:  <201205220959.q4M9xwcp002126@red.freebsd.org>
Resent-Message-ID: <201205221000.q4MA0C4C066729@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         168225
>Category:       ports
>Synopsis:       net-mgmt/nrpe2 : wrong owner of spool dir
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 22 10:00:12 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Yar Tikhiy
>Release:        9.0-RELEASE
>Organization:
NA
>Environment:
nrpe-2.13
>Description:
nrpe2, as installed by its port, runs as uid nagios and gid nagios once initialized.  However, its pid file is written to /var/spool/nagios owned by root:wheel.  When exiting, it can't remove its pidfile due to EPERM.  Later it can refuse to start e.g. if the pid from the stale pidfile was taken by an unrelated process.
>How-To-Repeat:
Just reboot a system with nrpe2 enabled.  See errors logged and nrpe not start.

May 22 19:26:57 nocproj nrpe[955]: Caught SIGTERM - shutting down...
May 22 19:26:57 nocproj nrpe[955]: Cannot remove pidfile '/var/spool/nagios/nrpe2.pid' - check your privileges.
May 22 19:26:57 nocproj nrpe[955]: Daemon shutdown
May 22 19:31:54 nocproj nrpe[1014]: Starting up daemon
May 22 19:31:54 nocproj nrpe[1014]: There's already an NRPE server running (PID 955).  Bailing out...

>Fix:
Chown ${NAGIOSDIR} to nagios:nagios after creating it in the do-install target using whatever port.mk magic it takes now.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205220959.q4M9xwcp002126>