From owner-freebsd-net@FreeBSD.ORG Sun Aug 3 18:50:40 2008 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B853F106564A; Sun, 3 Aug 2008 18:50:40 +0000 (UTC) (envelope-from eugen@kuzbass.ru) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.freebsd.org (Postfix) with ESMTP id 182BB8FC0C; Sun, 3 Aug 2008 18:50:39 +0000 (UTC) (envelope-from eugen@kuzbass.ru) Received: from www.svzserv.kemerovo.su (eugen@localhost [127.0.0.1]) by www.svzserv.kemerovo.su (8.13.8/8.13.8) with ESMTP id m73IXkfD053934; Mon, 4 Aug 2008 02:33:46 +0800 (KRAST) (envelope-from eugen@www.svzserv.kemerovo.su) Received: (from eugen@localhost) by www.svzserv.kemerovo.su (8.13.8/8.13.8/Submit) id m73IXk84053932; Mon, 4 Aug 2008 02:33:46 +0800 (KRAST) (envelope-from eugen) Date: Mon, 4 Aug 2008 02:33:46 +0800 From: Eugene Grosbein To: Doug Barton Message-ID: <20080803183346.GA53252@svzserv.kemerovo.su> References: <20080803073803.GA10321@grosbein.pp.ru> <4895EB57.2000801@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4895EB57.2000801@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@FreeBSD.org Subject: Re: permissions on /etc/namedb X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Aug 2008 18:50:40 -0000 On Sun, Aug 03, 2008 at 10:31:03AM -0700, Doug Barton wrote: > >I need /etc/namedb to be owned by root:bind and have permissions 01775, > >so bind may write to it but may not overwrite files that belong to root > >here, and I made it so. > I understand your frustration with something having changed that you > did not expect. I would like to ask you though, what are you trying to > accomplish here? What you suggested isn't really good from a security > perspective because if an attacker does get in they can remove files > from the directory that are owned by root and replace them with their > own versions. Can he? Doesn't sticky bit on the directory prevent him from that? > If you give me a better idea what you're trying to do then I can give > you some suggestions on how to make it happen. Well, I just want bind be allowed to write to is working directory. Yes, it's possible to redefine it but I'd rather avoid this, to not break existing setups. > >I dislike it very much when a system thinks it knows better what user > >needs. > > So do I. :) In this case however I wanted to set up a system that is > extremely secure by default so that the average user can be > comfortable starting named in its default configuration. I agree completly. > Obviously expert users can tweak the thing themselves. So, the question is: how to tweak? > >Also, I do not want to move a place where bind writes its files to another > >location just because system does not want it to write here. > > That's up to you of course, but it's definitely more secure in the > long run to do it that way. But that way prevents named to write to its working directory, this bothers me. Eugene Grosbein