From owner-freebsd-fs@freebsd.org Fri Nov 22 14:36:42 2019 Return-Path: Delivered-To: freebsd-fs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 53C1B1B9D13 for ; Fri, 22 Nov 2019 14:36:42 +0000 (UTC) (envelope-from jbe-mlist@magnetkern.de) Received: from sapphire.magnetkern.de (sapphire.magnetkern.de [185.228.139.199]) by mx1.freebsd.org (Postfix) with ESMTP id 47KJsP2xWHz3MZM for ; Fri, 22 Nov 2019 14:36:41 +0000 (UTC) (envelope-from jbe-mlist@magnetkern.de) Received: from titanium (p57A35420.dip0.t-ipconnect.de [87.163.84.32]) by sapphire.magnetkern.de (Postfix) with ESMTPSA id 130492005E; Fri, 22 Nov 2019 14:36:30 +0000 (UTC) Date: Fri, 22 Nov 2019 15:36:29 +0100 From: Jan Behrens To: Borja Marcos Cc: mike tancsa , Martin Simmons , freebsd-fs@freebsd.org Subject: Re: ZFS snapdir readability (Crosspost) Message-Id: <20191122153629.2278467855a646a4c0b8f2b4@magnetkern.de> In-Reply-To: References: <20191107004635.c6d2e7d464d3d556a0d87465@magnetkern.de> <9B22AD46-BE87-4305-9638-74D23AD4C8CA@sarenet.es> <261FE331-EC5C-48C8-9249-9BCBF887CE38@sarenet.es> <913f7040-6e38-452d-6187-e17fae63b652@sentex.net> <20191120144041.7f916360dc0c69bf509c9bd1@magnetkern.de> <20191120163437.691abd369ab9c0a6d7d45ff2@magnetkern.de> <20191120175803.03401c3316fe756cc46f79f1@magnetkern.de> <201911211119.xALBJSIW030544@higson.cam.lispworks.com> <20191121174926.17bf250f4c65964620811554@magnetkern.de> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 47KJsP2xWHz3MZM X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jbe-mlist@magnetkern.de designates 185.228.139.199 as permitted sender) smtp.mailfrom=jbe-mlist@magnetkern.de X-Spamd-Result: default: False [-1.47 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[32.84.163.87.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+mx]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[magnetkern.de]; NEURAL_HAM_LONG(-0.93)[-0.930,0]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.978,0]; IP_SCORE(0.14)[ipnet: 185.228.136.0/22(1.33), asn: 197540(-0.63), country: DE(-0.01)]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:197540, ipnet:185.228.136.0/22, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Nov 2019 14:36:42 -0000 On Fri, 22 Nov 2019 09:41:52 +0100 Borja Marcos wrote: > > On 21 Nov 2019, at 17:59, mike tancsa wrote: > > > > On 11/21/2019 11:49 AM, Jan Behrens wrote: > >> > >> As far as I know, there is no way to disable having .zfs/snapshot > >> readable by everyone, is that correct? > > > > I believe so. Hence the request to add a zfs feature to add a new > > option to snapdir along the lines of > > > > zfs set snapdir=inaccessible > > or > > zfs set snapdir=rootonly > > Instead of “inaccessible" I would say “disable” because it’s not only preventing access. It is > preventing an actual action from taking place: the automatic mounting of the snapshots > below .zfs/snapshot. So. “disable” is more descriptive. > > What about a third option, “owneronly”? Although I think it should be controlled by > the vfs.usermount property. > > Borja. I definitely would appreciate one of "rootonly" or "owneronly". I believe this is what most people would want/need. For me, either would suffice. I like the automounting feature, if it could be limited to root or the owner of the filesystem. "owneronly" (in contrast to "rootonly") would also support those cases where users shall be allowed to access the snapshots of their directories. How about "grouponly" and "wheelonly" (in addition to "rootonly", "owneronly", and "disable")? I guess that would cover pretty much everything, though it might be a bit clunky to add all these options. An alternative would be to simply provide a way to disable zfs snapshot auto-mounting at all (whether through zfs set or sysctl) instead of attempting to extend it with access control. Regards, Jan