From owner-freebsd-hackers Mon May 27 13: 2: 1 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from empty1.ekahuna.com (empty1.ekahuna.com [198.144.200.196]) by hub.freebsd.org (Postfix) with ESMTP id 2065437B409; Mon, 27 May 2002 13:01:56 -0700 (PDT) Received: from pc-02 (pc02.ekahuna.com [198.144.200.197]) by empty1.ekahuna.com (Post.Office MTA v3.5.3 release 223 ID# 0-0U10L2S100V35) with ESMTP id com; Mon, 27 May 2002 13:01:51 -0700 From: "Philip J. Koenig" Organization: The Electric Kahuna Organization To: Freebsd-hackers@FreeBSD.ORG Date: Mon, 27 May 2002 13:01:52 -0700 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: non-root /var/run files (was Re: Sendmail, smmsp, and pid file) Reply-To: pjklist@ekahuna.com Cc: Gregory Neil Shapiro , Lyndon Nerenberg , Claus Assmann In-reply-to: <15602.35609.352674.838016@horsey.gshapiro.net> References: <20020527185439041.AAA472@empty1.ekahuna.com@pc02.ekahuna.com> X-mailer: Pegasus Mail for Win32 (v3.12c) Message-ID: <20020527200151497.AAA458@empty1.ekahuna.com@pc02.ekahuna.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 27 May 2002, at 12:38, Gregory Neil Shapiro boldly uttered: > pjklist> Funny thing about that, I actually created a /var/run/named directory > pjklist> for just the purpose of running named in a 'sandbox', chowned the > pjklist> directory bind:bind, and because I forgot to set the pid file path in > pjklist> named.conf, I see that it seems to write named.pid (owned by > pjklist> bind:bind) into /var/run without a problem. > > For named, the initial creation isn't the problem, it's the reloads and > restarts: > > # ndc reload > Reload initiated. > # tail -2 /var/log/messages > May 27 12:36:35 horsey named[142]: couldn't create pid file '/var/run/named.pid' > May 27 12:36:35 horsey named[142]: Ready to answer queries. Good point, I think I've seen that before. SO I suppose it's safe to say there is a different method of startup, IE named apparently creates the pid file as root, then chowns it afterwards and "demotes itself", whereas sendmail doesn't bother. (not that it matters, as you mention, since named's handicap is just delayed) I have to say that with Bind-9, the fact that it starts as one uid and ends up as another is a hassle, because it makes logging more complicated than it should be. (starting as root then "demoting", startup messages can only be logged in syslog, when I prefer logging everything to dedicated named logfiles) -- Philip J. Koenig pjklist@ekahuna.com Electric Kahuna Systems -- Computers & Communications for the New Millenium To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message