From owner-freebsd-ports@freebsd.org Sun Jan 20 10:42:38 2019 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58B4914845F1 for ; Sun, 20 Jan 2019 10:42:38 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0011F8FC7C; Sun, 20 Jan 2019 10:42:37 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from atuin.in.mat.cc (unknown [IPv6:2a01:678:42:ffff:3e15:c2ff:fec4:452e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: mat/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 8025415037; Sun, 20 Jan 2019 10:42:37 +0000 (UTC) (envelope-from mat@FreeBSD.org) Date: Sun, 20 Jan 2019 11:42:34 +0100 From: Mathieu Arnold To: Dan Langille Cc: FreeBSD Ports , Mathieu Arnold Subject: Re: dns/bind911 - statistics-file Message-ID: <20190120104234.k5w5f7mrmzmpncx2@atuin.in.mat.cc> References: <0B943CDD-3A9E-4026-8AD4-8D8007902CCB@langille.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zzbertji3utfq7gt" Content-Disposition: inline In-Reply-To: <0B943CDD-3A9E-4026-8AD4-8D8007902CCB@langille.org> User-Agent: NeoMutt/20180716 X-Rspamd-Queue-Id: 0011F8FC7C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jan 2019 10:42:38 -0000 --zzbertji3utfq7gt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 19, 2019 at 07:50:45PM -0500, Dan Langille wrote: > Mat, >=20 > I encountered an odd situation where my stats file kept changing permissi= ons. With every reinstall of bind911, > the permissions on var/run/named/stats change to chown root:bind which pr= events bind from updating the file. >=20 > This is what I need: >=20 > $ ls -l /var/run/named/stats > -rw-r--r-- 1 bind bind 11507 Jan 20 00:45 /var/run/named/stats >=20 > Could that change be carried out by this file? >=20 > https://svnweb.freebsd.org/ports/head/dns/bind911/files/BIND.chroot.dis= t?view=3Dmarkup#l24 >=20 > I don't see a reference to /var/run/named/stats in BIND.chroot.dist but c= an't help but wonder if it's something similar. >=20 > I have been using these options: >=20 > directory "/usr/local/etc/namedb/working"; > pid-file "/var/run/named/pid"; > dump-file "/var/dump/named_dump.db"; > statistics-file "/var/run/named/stats"; > zone-statistics yes; >=20 > When researching this tonight, I noticed the sample configuration uses /v= ar/run/named.stats. Perhaps I'm doing this wrong. > I am happy to change my configuration, but first I write in case the scri= pt is doing something unexpected. I do not think anything in the BIND9 ports would change the file permission= s. The mtree file only touches the directories to make sure they have the correct permissions, so it is not it. Moreover the mtree file is ONLY used when using named_chrootdir to chroot named, which does not appear to be your case. The BIND9 ports have not had a pkg-install script for years, so it's not it either. The rc file does not chown anything, so it's not it doing it either. Side note, the sample configuration uses /var/stats/named.stats, not /var/run/named.stats. And it was ever since it was added to the base system named.conf file back in 2004 (in src r135918). So I'd say something else on your system "fixes" the file's permissions. --=20 Mathieu Arnold --zzbertji3utfq7gt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEEOraXidLtEhBkQLpbOkUW81GDzkgFAlxEUJpfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNB QjY5Nzg5RDJFRDEyMTA2NDQwQkE1QjNBNDUxNkYzNTE4M0NFNDgACgkQOkUW81GD zkjbeg/+LoOccQiC1f/4nBQYgSEW0mRYN9FLN2dsPos99Dr0/T9zg0gXN9iBQlBx vQ0e1x+k1R/xVQQ9ArPP+k41SN7X7JtX+MopBE0bpa8CmxBEU+wJu+mbmculXmFC KoGFrlr+p1GG2rMVaYXHOeKX55p2EcV/mfHlgYXuHeOeYlbGg7AOwEPIS8F/Fm/d vocOcQQ+xujvJVfqJRdfqwIwXaHDiCtS8gu78ouuJgv2MkxNCXMC1RfwnwPp6pq/ /f9n7Nh2xAc+zsrlep6xQxasREftPXQnNecf4CtWl/Tfbi1qxxxtX8a1qzzwQNPl H/oxZjU103Wfv9nq3/pj3yGKXsU0h/PYGa2c3cLsUX0Grkp6nJYO6DHoPfNtbjxF QIbHKIgmwyHY2K8i0tja/c/djH8bcxt3mbdtaI5VlZTuohz5qp34Hvo5lWAwuWjT stOcjjH9zX+p006KNbIOwW7OXyWFm+/7ytNgDqz1I4FxSM6jyHLIYdwclVswTj5s 9pi+XILLXFIMHewTxUSVyK3hwEPcn/H1CGLwjVQN/NjzUG4Fzex8121+VFrq9AEA GcgF/ak5sJ/vJigiowlgr5AweqgsFk/3/PcWPuFXdQM9uhpXwdxkwmmsvq7xrHSb UkqXlEInb+1QzmFiia6FyvooDcjXs5esADX7KJmAHVXcYdsaD3g= =BMsm -----END PGP SIGNATURE----- --zzbertji3utfq7gt--