161145dc2SMartin Matuska.\" SPDX-License-Identifier: CDDL-1.0
2eda14cbcSMatt Macy.\"
3eda14cbcSMatt Macy.\" CDDL HEADER START
4eda14cbcSMatt Macy.\"
5eda14cbcSMatt Macy.\" The contents of this file are subject to the terms of the
6eda14cbcSMatt Macy.\" Common Development and Distribution License (the "License").
7eda14cbcSMatt Macy.\" You may not use this file except in compliance with the License.
8eda14cbcSMatt Macy.\"
9eda14cbcSMatt Macy.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10271171e0SMartin Matuska.\" or https://opensource.org/licenses/CDDL-1.0.
11eda14cbcSMatt Macy.\" See the License for the specific language governing permissions
12eda14cbcSMatt Macy.\" and limitations under the License.
13eda14cbcSMatt Macy.\"
14eda14cbcSMatt Macy.\" When distributing Covered Code, include this CDDL HEADER in each
15eda14cbcSMatt Macy.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16eda14cbcSMatt Macy.\" If applicable, add the following below this CDDL HEADER, with the
17eda14cbcSMatt Macy.\" fields enclosed by brackets "[]" replaced with your own identifying
18eda14cbcSMatt Macy.\" information: Portions Copyright [yyyy] [name of copyright owner]
19eda14cbcSMatt Macy.\"
20eda14cbcSMatt Macy.\" CDDL HEADER END
21eda14cbcSMatt Macy.\"
22eda14cbcSMatt Macy.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
23eda14cbcSMatt Macy.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
24eda14cbcSMatt Macy.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
25eda14cbcSMatt Macy.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
26eda14cbcSMatt Macy.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
27eda14cbcSMatt Macy.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
28eda14cbcSMatt Macy.\" Copyright (c) 2014 Integros [integros.com]
29eda14cbcSMatt Macy.\" Copyright 2019 Richard Laager. All rights reserved.
30eda14cbcSMatt Macy.\" Copyright 2018 Nexenta Systems, Inc.
31eda14cbcSMatt Macy.\" Copyright 2019 Joyent, Inc.
32eda14cbcSMatt Macy.\"
33da5137abSMartin Matuska.Dd March 16, 2022
34eda14cbcSMatt Macy.Dt ZFS-ALLOW 8
35eda14cbcSMatt Macy.Os
3616038816SMartin Matuska.
37eda14cbcSMatt Macy.Sh NAME
387877fdebSMatt Macy.Nm zfs-allow
3916038816SMartin Matuska.Nd delegate ZFS administration permissions to unprivileged users
40eda14cbcSMatt Macy.Sh SYNOPSIS
417877fdebSMatt Macy.Nm zfs
42eda14cbcSMatt Macy.Cm allow
43eda14cbcSMatt Macy.Op Fl dglu
4416038816SMartin Matuska.Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns …
45eda14cbcSMatt Macy.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
4616038816SMartin Matuska.Ar setname Oc Ns …
47eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
487877fdebSMatt Macy.Nm zfs
49eda14cbcSMatt Macy.Cm allow
50eda14cbcSMatt Macy.Op Fl dl
51eda14cbcSMatt Macy.Fl e Ns | Ns Sy everyone
52eda14cbcSMatt Macy.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
5316038816SMartin Matuska.Ar setname Oc Ns …
54eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
557877fdebSMatt Macy.Nm zfs
56eda14cbcSMatt Macy.Cm allow
57eda14cbcSMatt Macy.Fl c
58eda14cbcSMatt Macy.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
5916038816SMartin Matuska.Ar setname Oc Ns …
60eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
617877fdebSMatt Macy.Nm zfs
62eda14cbcSMatt Macy.Cm allow
63eda14cbcSMatt Macy.Fl s No @ Ns Ar setname
64eda14cbcSMatt Macy.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
6516038816SMartin Matuska.Ar setname Oc Ns …
66eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
677877fdebSMatt Macy.Nm zfs
68eda14cbcSMatt Macy.Cm unallow
69eda14cbcSMatt Macy.Op Fl dglru
7016038816SMartin Matuska.Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns …
71eda14cbcSMatt Macy.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
7216038816SMartin Matuska.Ar setname Oc Ns … Oc
73eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
747877fdebSMatt Macy.Nm zfs
75eda14cbcSMatt Macy.Cm unallow
76eda14cbcSMatt Macy.Op Fl dlr
77eda14cbcSMatt Macy.Fl e Ns | Ns Sy everyone
78eda14cbcSMatt Macy.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
7916038816SMartin Matuska.Ar setname Oc Ns … Oc
80eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
817877fdebSMatt Macy.Nm zfs
82eda14cbcSMatt Macy.Cm unallow
83eda14cbcSMatt Macy.Op Fl r
84eda14cbcSMatt Macy.Fl c
85eda14cbcSMatt Macy.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
8616038816SMartin Matuska.Ar setname Oc Ns … Oc
87eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
887877fdebSMatt Macy.Nm zfs
89eda14cbcSMatt Macy.Cm unallow
90eda14cbcSMatt Macy.Op Fl r
91eda14cbcSMatt Macy.Fl s No @ Ns Ar setname
92eda14cbcSMatt Macy.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
9316038816SMartin Matuska.Ar setname Oc Ns … Oc
94eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
9516038816SMartin Matuska.
96eda14cbcSMatt Macy.Sh DESCRIPTION
97eda14cbcSMatt Macy.Bl -tag -width ""
98eda14cbcSMatt Macy.It Xo
997877fdebSMatt Macy.Nm zfs
100eda14cbcSMatt Macy.Cm allow
101eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
102eda14cbcSMatt Macy.Xc
103eda14cbcSMatt MacyDisplays permissions that have been delegated on the specified filesystem or
104eda14cbcSMatt Macyvolume.
105eda14cbcSMatt MacySee the other forms of
106eda14cbcSMatt Macy.Nm zfs Cm allow
107eda14cbcSMatt Macyfor more information.
108eda14cbcSMatt Macy.Pp
109eda14cbcSMatt MacyDelegations are supported under Linux with the exception of
110eda14cbcSMatt Macy.Sy mount ,
111eda14cbcSMatt Macy.Sy unmount ,
112eda14cbcSMatt Macy.Sy mountpoint ,
113eda14cbcSMatt Macy.Sy canmount ,
114eda14cbcSMatt Macy.Sy rename ,
115eda14cbcSMatt Macyand
116eda14cbcSMatt Macy.Sy share .
117eda14cbcSMatt MacyThese permissions cannot be delegated because the Linux
118eda14cbcSMatt Macy.Xr mount 8
119eda14cbcSMatt Macycommand restricts modifications of the global namespace to the root user.
120eda14cbcSMatt Macy.It Xo
1217877fdebSMatt Macy.Nm zfs
122eda14cbcSMatt Macy.Cm allow
123eda14cbcSMatt Macy.Op Fl dglu
12416038816SMartin Matuska.Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns …
125eda14cbcSMatt Macy.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
12616038816SMartin Matuska.Ar setname Oc Ns …
127eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
128eda14cbcSMatt Macy.Xc
129eda14cbcSMatt Macy.It Xo
1307877fdebSMatt Macy.Nm zfs
131eda14cbcSMatt Macy.Cm allow
132eda14cbcSMatt Macy.Op Fl dl
133eda14cbcSMatt Macy.Fl e Ns | Ns Sy everyone
134eda14cbcSMatt Macy.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
13516038816SMartin Matuska.Ar setname Oc Ns …
136eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
137eda14cbcSMatt Macy.Xc
138eda14cbcSMatt MacyDelegates ZFS administration permission for the file systems to non-privileged
139eda14cbcSMatt Macyusers.
140eda14cbcSMatt Macy.Bl -tag -width "-d"
141eda14cbcSMatt Macy.It Fl d
142eda14cbcSMatt MacyAllow only for the descendent file systems.
143eda14cbcSMatt Macy.It Fl e Ns | Ns Sy everyone
144eda14cbcSMatt MacySpecifies that the permissions be delegated to everyone.
14516038816SMartin Matuska.It Fl g Ar group Ns Oo , Ns Ar group Oc Ns …
146eda14cbcSMatt MacyExplicitly specify that permissions are delegated to the group.
147eda14cbcSMatt Macy.It Fl l
148eda14cbcSMatt MacyAllow
149eda14cbcSMatt Macy.Qq locally
150eda14cbcSMatt Macyonly for the specified file system.
15116038816SMartin Matuska.It Fl u Ar user Ns Oo , Ns Ar user Oc Ns …
152eda14cbcSMatt MacyExplicitly specify that permissions are delegated to the user.
15316038816SMartin Matuska.It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns …
154eda14cbcSMatt MacySpecifies to whom the permissions are delegated.
155eda14cbcSMatt MacyMultiple entities can be specified as a comma-separated list.
156eda14cbcSMatt MacyIf neither of the
157eda14cbcSMatt Macy.Fl gu
158eda14cbcSMatt Macyoptions are specified, then the argument is interpreted preferentially as the
159eda14cbcSMatt Macykeyword
160eda14cbcSMatt Macy.Sy everyone ,
161eda14cbcSMatt Macythen as a user name, and lastly as a group name.
162eda14cbcSMatt MacyTo specify a user or group named
163eda14cbcSMatt Macy.Qq everyone ,
164eda14cbcSMatt Macyuse the
165eda14cbcSMatt Macy.Fl g
166eda14cbcSMatt Macyor
167eda14cbcSMatt Macy.Fl u
168eda14cbcSMatt Macyoptions.
169eda14cbcSMatt MacyTo specify a group with the same name as a user, use the
170eda14cbcSMatt Macy.Fl g
171eda14cbcSMatt Macyoptions.
172eda14cbcSMatt Macy.It Xo
173eda14cbcSMatt Macy.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
17416038816SMartin Matuska.Ar setname Oc Ns …
175eda14cbcSMatt Macy.Xc
176eda14cbcSMatt MacyThe permissions to delegate.
177eda14cbcSMatt MacyMultiple permissions may be specified as a comma-separated list.
178eda14cbcSMatt MacyPermission names are the same as ZFS subcommand and property names.
179eda14cbcSMatt MacySee the property list below.
180eda14cbcSMatt MacyProperty set names, which begin with
181eda14cbcSMatt Macy.Sy @ ,
182eda14cbcSMatt Macymay be specified.
183eda14cbcSMatt MacySee the
184eda14cbcSMatt Macy.Fl s
185eda14cbcSMatt Macyform below for details.
186eda14cbcSMatt Macy.El
187eda14cbcSMatt Macy.Pp
188eda14cbcSMatt MacyIf neither of the
189eda14cbcSMatt Macy.Fl dl
190eda14cbcSMatt Macyoptions are specified, or both are, then the permissions are allowed for the
19161145dc2SMartin Matuskafile system or volume, and all of its descendants.
192eda14cbcSMatt Macy.Pp
193eda14cbcSMatt MacyPermissions are generally the ability to use a ZFS subcommand or change a ZFS
194eda14cbcSMatt Macyproperty.
195eda14cbcSMatt MacyThe following permissions are available:
19616038816SMartin Matuska.TS
19716038816SMartin Matuskal l l .
198eda14cbcSMatt MacyNAME	TYPE	NOTES
19916038816SMartin Matuska_	_	_
20016038816SMartin Matuskaallow	subcommand	Must also have the permission that is being allowed
20116038816SMartin Matuskabookmark	subcommand
20216038816SMartin Matuskaclone	subcommand	Must also have the \fBcreate\fR ability and \fBmount\fR ability in the origin file system
20316038816SMartin Matuskacreate	subcommand	Must also have the \fBmount\fR ability. Must also have the \fBrefreservation\fR ability to create a non-sparse volume.
20416038816SMartin Matuskadestroy	subcommand	Must also have the \fBmount\fR ability
20516038816SMartin Matuskadiff	subcommand	Allows lookup of paths within a dataset given an object number, and the ability to create snapshots necessary to \fBzfs diff\fR.
206f9693befSMartin Matuskahold	subcommand	Allows adding a user hold to a snapshot
2071f88aa09SMartin Matuskaload-key	subcommand	Allows loading and unloading of encryption key (see \fBzfs load-key\fR and \fBzfs unload-key\fR).
2081f88aa09SMartin Matuskachange-key	subcommand	Allows changing an encryption key via \fBzfs change-key\fR.
20961145dc2SMartin Matuskamount	subcommand	Allows mounting/unmounting ZFS datasets
21016038816SMartin Matuskapromote	subcommand	Must also have the \fBmount\fR and \fBpromote\fR ability in the origin file system
21161145dc2SMartin Matuskareceive	subcommand	Must also have the \fBmount\fR and \fBcreate\fR ability, required for \fBzfs receive -F\fR (see also \fBreceive:append\fR for limited, non forced receive)
21216038816SMartin Matuskarelease	subcommand	Allows releasing a user hold which might destroy the snapshot
21316038816SMartin Matuskarename	subcommand	Must also have the \fBmount\fR and \fBcreate\fR ability in the new parent
21416038816SMartin Matuskarollback	subcommand	Must also have the \fBmount\fR ability
215eda14cbcSMatt Macysend	subcommand
21616038816SMartin Matuskashare	subcommand	Allows sharing file systems over NFS or SMB protocols
21716038816SMartin Matuskasnapshot	subcommand	Must also have the \fBmount\fR ability
218eda14cbcSMatt Macy
21961145dc2SMartin Matuskareceive:append	other	Must also have the \fBmount\fR and \fBcreate\fR ability, limited receive ability (can not do receive -F)
220716fd348SMartin Matuskagroupquota	other	Allows accessing any \fBgroupquota@\fI…\fR property
221716fd348SMartin Matuskagroupobjquota	other	Allows accessing any \fBgroupobjquota@\fI…\fR property
222716fd348SMartin Matuskagroupused	other	Allows reading any \fBgroupused@\fI…\fR property
223716fd348SMartin Matuskagroupobjused	other	Allows reading any \fBgroupobjused@\fI…\fR property
224eda14cbcSMatt Macyuserprop	other	Allows changing any user property
225716fd348SMartin Matuskauserquota	other	Allows accessing any \fBuserquota@\fI…\fR property
226716fd348SMartin Matuskauserobjquota	other	Allows accessing any \fBuserobjquota@\fI…\fR property
227716fd348SMartin Matuskauserused	other	Allows reading any \fBuserused@\fI…\fR property
228716fd348SMartin Matuskauserobjused	other	Allows reading any \fBuserobjused@\fI…\fR property
229716fd348SMartin Matuskaprojectobjquota	other	Allows accessing any \fBprojectobjquota@\fI…\fR property
230716fd348SMartin Matuskaprojectquota	other	Allows accessing any \fBprojectquota@\fI…\fR property
231716fd348SMartin Matuskaprojectobjused	other	Allows reading any \fBprojectobjused@\fI…\fR property
232716fd348SMartin Matuskaprojectused	other	Allows reading any \fBprojectused@\fI…\fR property
233eda14cbcSMatt Macy
234eda14cbcSMatt Macyaclinherit	property
2351f88aa09SMartin Matuskaaclmode	property
236eda14cbcSMatt Macyacltype	property
237eda14cbcSMatt Macyatime	property
238eda14cbcSMatt Macycanmount	property
239eda14cbcSMatt Macycasesensitivity	property
240eda14cbcSMatt Macychecksum	property
241eda14cbcSMatt Macycompression	property
2421f88aa09SMartin Matuskacontext	property
243eda14cbcSMatt Macycopies	property
2441f88aa09SMartin Matuskadedup	property
2451f88aa09SMartin Matuskadefcontext	property
246eda14cbcSMatt Macydevices	property
2471f88aa09SMartin Matuskadnodesize	property
2481f88aa09SMartin Matuskaencryption	property
249eda14cbcSMatt Macyexec	property
250eda14cbcSMatt Macyfilesystem_limit	property
2511f88aa09SMartin Matuskafscontext	property
2521f88aa09SMartin Matuskakeyformat	property
2531f88aa09SMartin Matuskakeylocation	property
2541f88aa09SMartin Matuskalogbias	property
2551f88aa09SMartin Matuskamlslabel	property
256eda14cbcSMatt Macymountpoint	property
257eda14cbcSMatt Macynbmand	property
258eda14cbcSMatt Macynormalization	property
2591f88aa09SMartin Matuskaoverlay	property
2601f88aa09SMartin Matuskapbkdf2iters	property
261eda14cbcSMatt Macyprimarycache	property
262eda14cbcSMatt Macyquota	property
263eda14cbcSMatt Macyreadonly	property
264eda14cbcSMatt Macyrecordsize	property
2651f88aa09SMartin Matuskaredundant_metadata	property
266eda14cbcSMatt Macyrefquota	property
267eda14cbcSMatt Macyrefreservation	property
2681f88aa09SMartin Matuskarelatime	property
269eda14cbcSMatt Macyreservation	property
2701f88aa09SMartin Matuskarootcontext	property
271eda14cbcSMatt Macysecondarycache	property
272eda14cbcSMatt Macysetuid	property
273eda14cbcSMatt Macysharenfs	property
274eda14cbcSMatt Macysharesmb	property
2751f88aa09SMartin Matuskasnapdev	property
276eda14cbcSMatt Macysnapdir	property
277eda14cbcSMatt Macysnapshot_limit	property
2781f88aa09SMartin Matuskaspecial_small_blocks	property
2791f88aa09SMartin Matuskasync	property
280eda14cbcSMatt Macyutf8only	property
281eda14cbcSMatt Macyversion	property
282eda14cbcSMatt Macyvolblocksize	property
2831f88aa09SMartin Matuskavolmode	property
284eda14cbcSMatt Macyvolsize	property
285eda14cbcSMatt Macyvscan	property
286eda14cbcSMatt Macyxattr	property
287eda14cbcSMatt Macyzoned	property
28816038816SMartin Matuska.TE
289eda14cbcSMatt Macy.It Xo
2907877fdebSMatt Macy.Nm zfs
291eda14cbcSMatt Macy.Cm allow
292eda14cbcSMatt Macy.Fl c
293eda14cbcSMatt Macy.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
29416038816SMartin Matuska.Ar setname Oc Ns …
295eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
296eda14cbcSMatt Macy.Xc
297eda14cbcSMatt MacySets
298eda14cbcSMatt Macy.Qq create time
299eda14cbcSMatt Macypermissions.
300eda14cbcSMatt MacyThese permissions are granted
301eda14cbcSMatt Macy.Pq locally
302eda14cbcSMatt Macyto the creator of any newly-created descendent file system.
303eda14cbcSMatt Macy.It Xo
3047877fdebSMatt Macy.Nm zfs
305eda14cbcSMatt Macy.Cm allow
306eda14cbcSMatt Macy.Fl s No @ Ns Ar setname
307eda14cbcSMatt Macy.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
30816038816SMartin Matuska.Ar setname Oc Ns …
309eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
310eda14cbcSMatt Macy.Xc
311eda14cbcSMatt MacyDefines or adds permissions to a permission set.
312eda14cbcSMatt MacyThe set can be used by other
313eda14cbcSMatt Macy.Nm zfs Cm allow
31461145dc2SMartin Matuskacommands for the specified file system and its descendants.
315eda14cbcSMatt MacySets are evaluated dynamically, so changes to a set are immediately reflected.
316eda14cbcSMatt MacyPermission sets follow the same naming restrictions as ZFS file systems, but the
317eda14cbcSMatt Macyname must begin with
318eda14cbcSMatt Macy.Sy @ ,
319eda14cbcSMatt Macyand can be no more than 64 characters long.
320eda14cbcSMatt Macy.It Xo
3217877fdebSMatt Macy.Nm zfs
322eda14cbcSMatt Macy.Cm unallow
323eda14cbcSMatt Macy.Op Fl dglru
32416038816SMartin Matuska.Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns …
325eda14cbcSMatt Macy.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
32616038816SMartin Matuska.Ar setname Oc Ns … Oc
327eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
328eda14cbcSMatt Macy.Xc
329eda14cbcSMatt Macy.It Xo
3307877fdebSMatt Macy.Nm zfs
331eda14cbcSMatt Macy.Cm unallow
332eda14cbcSMatt Macy.Op Fl dlr
333eda14cbcSMatt Macy.Fl e Ns | Ns Sy everyone
334eda14cbcSMatt Macy.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
33516038816SMartin Matuska.Ar setname Oc Ns … Oc
336eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
337eda14cbcSMatt Macy.Xc
338eda14cbcSMatt Macy.It Xo
3397877fdebSMatt Macy.Nm zfs
340eda14cbcSMatt Macy.Cm unallow
341eda14cbcSMatt Macy.Op Fl r
342eda14cbcSMatt Macy.Fl c
343eda14cbcSMatt Macy.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
34416038816SMartin Matuska.Ar setname Oc Ns … Oc
345eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
346eda14cbcSMatt Macy.Xc
347eda14cbcSMatt MacyRemoves permissions that were granted with the
348eda14cbcSMatt Macy.Nm zfs Cm allow
349eda14cbcSMatt Macycommand.
350eda14cbcSMatt MacyNo permissions are explicitly denied, so other permissions granted are still in
351eda14cbcSMatt Macyeffect.
352eda14cbcSMatt MacyFor example, if the permission is granted by an ancestor.
353eda14cbcSMatt MacyIf no permissions are specified, then all permissions for the specified
354eda14cbcSMatt Macy.Ar user ,
355eda14cbcSMatt Macy.Ar group ,
356eda14cbcSMatt Macyor
357eda14cbcSMatt Macy.Sy everyone
358eda14cbcSMatt Macyare removed.
359eda14cbcSMatt MacySpecifying
360eda14cbcSMatt Macy.Sy everyone
361eda14cbcSMatt Macy.Po or using the
362eda14cbcSMatt Macy.Fl e
363eda14cbcSMatt Macyoption
364eda14cbcSMatt Macy.Pc
365eda14cbcSMatt Macyonly removes the permissions that were granted to everyone, not all permissions
366eda14cbcSMatt Macyfor every user and group.
367eda14cbcSMatt MacySee the
368eda14cbcSMatt Macy.Nm zfs Cm allow
369eda14cbcSMatt Macycommand for a description of the
370eda14cbcSMatt Macy.Fl ldugec
371eda14cbcSMatt Macyoptions.
372eda14cbcSMatt Macy.Bl -tag -width "-r"
373eda14cbcSMatt Macy.It Fl r
37461145dc2SMartin MatuskaRecursively remove the permissions from this file system and all descendants.
375eda14cbcSMatt Macy.El
376eda14cbcSMatt Macy.It Xo
3777877fdebSMatt Macy.Nm zfs
378eda14cbcSMatt Macy.Cm unallow
379eda14cbcSMatt Macy.Op Fl r
380eda14cbcSMatt Macy.Fl s No @ Ns Ar setname
381eda14cbcSMatt Macy.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
38216038816SMartin Matuska.Ar setname Oc Ns … Oc
383eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar volume
384eda14cbcSMatt Macy.Xc
385eda14cbcSMatt MacyRemoves permissions from a permission set.
386eda14cbcSMatt MacyIf no permissions are specified, then all permissions are removed, thus removing
387eda14cbcSMatt Macythe set entirely.
388eda14cbcSMatt Macy.El
389da5137abSMartin Matuska.
390da5137abSMartin Matuska.Sh EXAMPLES
391da5137abSMartin Matuska.\" These are, respectively, examples 17, 18, 19, 20 from zfs.8
392da5137abSMartin Matuska.\" Make sure to update them bidirectionally
393da5137abSMartin Matuska.Ss Example 1 : No Delegating ZFS Administration Permissions on a ZFS Dataset
394da5137abSMartin MatuskaThe following example shows how to set permissions so that user
395da5137abSMartin Matuska.Ar cindys
396da5137abSMartin Matuskacan create, destroy, mount, and take snapshots on
397da5137abSMartin Matuska.Ar tank/cindys .
398da5137abSMartin MatuskaThe permissions on
399da5137abSMartin Matuska.Ar tank/cindys
400da5137abSMartin Matuskaare also displayed.
401da5137abSMartin Matuska.Bd -literal -compact -offset Ds
402da5137abSMartin Matuska.No # Nm zfs Cm allow Sy cindys create , Ns Sy destroy , Ns Sy mount , Ns Sy snapshot Ar tank/cindys
403da5137abSMartin Matuska.No # Nm zfs Cm allow Ar tank/cindys
404da5137abSMartin Matuska---- Permissions on tank/cindys --------------------------------------
405da5137abSMartin MatuskaLocal+Descendent permissions:
406da5137abSMartin Matuska        user cindys create,destroy,mount,snapshot
407da5137abSMartin Matuska.Ed
408da5137abSMartin Matuska.Pp
409da5137abSMartin MatuskaBecause the
410da5137abSMartin Matuska.Ar tank/cindys
411da5137abSMartin Matuskamount point permission is set to 755 by default, user
412da5137abSMartin Matuska.Ar cindys
413da5137abSMartin Matuskawill be unable to mount file systems under
414da5137abSMartin Matuska.Ar tank/cindys .
415da5137abSMartin MatuskaAdd an ACE similar to the following syntax to provide mount point access:
416da5137abSMartin Matuska.Dl # Cm chmod No A+user : Ns Ar cindys Ns :add_subdirectory:allow Ar /tank/cindys
417da5137abSMartin Matuska.
418da5137abSMartin Matuska.Ss Example 2 : No Delegating Create Time Permissions on a ZFS Dataset
419da5137abSMartin MatuskaThe following example shows how to grant anyone in the group
420da5137abSMartin Matuska.Ar staff
421da5137abSMartin Matuskato create file systems in
422da5137abSMartin Matuska.Ar tank/users .
423da5137abSMartin MatuskaThis syntax also allows staff members to destroy their own file systems, but not
424da5137abSMartin Matuskadestroy anyone else's file system.
425da5137abSMartin MatuskaThe permissions on
426da5137abSMartin Matuska.Ar tank/users
427da5137abSMartin Matuskaare also displayed.
428da5137abSMartin Matuska.Bd -literal -compact -offset Ds
429da5137abSMartin Matuska.No # Nm zfs Cm allow Ar staff Sy create , Ns Sy mount Ar tank/users
430da5137abSMartin Matuska.No # Nm zfs Cm allow Fl c Sy destroy Ar tank/users
431da5137abSMartin Matuska.No # Nm zfs Cm allow Ar tank/users
432da5137abSMartin Matuska---- Permissions on tank/users ---------------------------------------
433da5137abSMartin MatuskaPermission sets:
434da5137abSMartin Matuska        destroy
435da5137abSMartin MatuskaLocal+Descendent permissions:
436da5137abSMartin Matuska        group staff create,mount
437da5137abSMartin Matuska.Ed
438da5137abSMartin Matuska.
439da5137abSMartin Matuska.Ss Example 3 : No Defining and Granting a Permission Set on a ZFS Dataset
440da5137abSMartin MatuskaThe following example shows how to define and grant a permission set on the
441da5137abSMartin Matuska.Ar tank/users
442da5137abSMartin Matuskafile system.
443da5137abSMartin MatuskaThe permissions on
444da5137abSMartin Matuska.Ar tank/users
445da5137abSMartin Matuskaare also displayed.
446da5137abSMartin Matuska.Bd -literal -compact -offset Ds
447da5137abSMartin Matuska.No # Nm zfs Cm allow Fl s No @ Ns Ar pset Sy create , Ns Sy destroy , Ns Sy snapshot , Ns Sy mount Ar tank/users
448da5137abSMartin Matuska.No # Nm zfs Cm allow staff No @ Ns Ar pset tank/users
449da5137abSMartin Matuska.No # Nm zfs Cm allow Ar tank/users
450da5137abSMartin Matuska---- Permissions on tank/users ---------------------------------------
451da5137abSMartin MatuskaPermission sets:
452da5137abSMartin Matuska        @pset create,destroy,mount,snapshot
453da5137abSMartin MatuskaLocal+Descendent permissions:
454da5137abSMartin Matuska        group staff @pset
455da5137abSMartin Matuska.Ed
456da5137abSMartin Matuska.
457da5137abSMartin Matuska.Ss Example 4 : No Delegating Property Permissions on a ZFS Dataset
458da5137abSMartin MatuskaThe following example shows to grant the ability to set quotas and reservations
459da5137abSMartin Matuskaon the
460da5137abSMartin Matuska.Ar users/home
461da5137abSMartin Matuskafile system.
462da5137abSMartin MatuskaThe permissions on
463da5137abSMartin Matuska.Ar users/home
464da5137abSMartin Matuskaare also displayed.
465da5137abSMartin Matuska.Bd -literal -compact -offset Ds
466da5137abSMartin Matuska.No # Nm zfs Cm allow Ar cindys Sy quota , Ns Sy reservation Ar users/home
467da5137abSMartin Matuska.No # Nm zfs Cm allow Ar users/home
468da5137abSMartin Matuska---- Permissions on users/home ---------------------------------------
469da5137abSMartin MatuskaLocal+Descendent permissions:
470da5137abSMartin Matuska        user cindys quota,reservation
471da5137abSMartin Matuskacindys% zfs set quota=10G users/home/marks
472da5137abSMartin Matuskacindys% zfs get quota users/home/marks
473da5137abSMartin MatuskaNAME              PROPERTY  VALUE  SOURCE
474da5137abSMartin Matuskausers/home/marks  quota     10G    local
475da5137abSMartin Matuska.Ed
476da5137abSMartin Matuska.
477da5137abSMartin Matuska.Ss Example 5 : No Removing ZFS Delegated Permissions on a ZFS Dataset
478da5137abSMartin MatuskaThe following example shows how to remove the snapshot permission from the
479da5137abSMartin Matuska.Ar staff
480da5137abSMartin Matuskagroup on the
481da5137abSMartin Matuska.Sy tank/users
482da5137abSMartin Matuskafile system.
483da5137abSMartin MatuskaThe permissions on
484da5137abSMartin Matuska.Sy tank/users
485da5137abSMartin Matuskaare also displayed.
486da5137abSMartin Matuska.Bd -literal -compact -offset Ds
487da5137abSMartin Matuska.No # Nm zfs Cm unallow Ar staff Sy snapshot Ar tank/users
488da5137abSMartin Matuska.No # Nm zfs Cm allow Ar tank/users
489da5137abSMartin Matuska---- Permissions on tank/users ---------------------------------------
490da5137abSMartin MatuskaPermission sets:
491da5137abSMartin Matuska        @pset create,destroy,mount,snapshot
492da5137abSMartin MatuskaLocal+Descendent permissions:
493da5137abSMartin Matuska        group staff @pset
494da5137abSMartin Matuska.Ed
495