4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").
6 .\" You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or https://opensource.org/licenses/CDDL-1.0.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
21 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
22 .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
23 .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
24 .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
25 .\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
26 .\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
27 .\" Copyright (c) 2014 Integros [integros.com]
28 .\" Copyright 2019 Richard Laager. All rights reserved.
29 .\" Copyright 2018 Nexenta Systems, Inc.
30 .\" Copyright 2019 Joyent, Inc.
38 .Nd delegate ZFS administration permissions to unprivileged users
43 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns …
44 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
46 .Ar filesystem Ns | Ns Ar volume
50 .Fl e Ns | Ns Sy everyone
51 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
53 .Ar filesystem Ns | Ns Ar volume
57 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
59 .Ar filesystem Ns | Ns Ar volume
62 .Fl s No @ Ns Ar setname
63 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
65 .Ar filesystem Ns | Ns Ar volume
69 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns …
70 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
71 .Ar setname Oc Ns … Oc
72 .Ar filesystem Ns | Ns Ar volume
76 .Fl e Ns | Ns Sy everyone
77 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
78 .Ar setname Oc Ns … Oc
79 .Ar filesystem Ns | Ns Ar volume
84 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
85 .Ar setname Oc Ns … Oc
86 .Ar filesystem Ns | Ns Ar volume
90 .Fl s No @ Ns Ar setname
91 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
92 .Ar setname Oc Ns … Oc
93 .Ar filesystem Ns | Ns Ar volume
100 .Ar filesystem Ns | Ns Ar volume
102 Displays permissions that have been delegated on the specified filesystem or
104 See the other forms of
106 for more information.
108 Delegations are supported under Linux with the exception of
116 These permissions cannot be delegated because the Linux
118 command restricts modifications of the global namespace to the root user.
123 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns …
124 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
126 .Ar filesystem Ns | Ns Ar volume
132 .Fl e Ns | Ns Sy everyone
133 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
135 .Ar filesystem Ns | Ns Ar volume
137 Delegates ZFS administration permission for the file systems to non-privileged
141 Allow only for the descendent file systems.
142 .It Fl e Ns | Ns Sy everyone
143 Specifies that the permissions be delegated to everyone.
144 .It Fl g Ar group Ns Oo , Ns Ar group Oc Ns …
145 Explicitly specify that permissions are delegated to the group.
149 only for the specified file system.
150 .It Fl u Ar user Ns Oo , Ns Ar user Oc Ns …
151 Explicitly specify that permissions are delegated to the user.
152 .It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns …
153 Specifies to whom the permissions are delegated.
154 Multiple entities can be specified as a comma-separated list.
157 options are specified, then the argument is interpreted preferentially as the
160 then as a user name, and lastly as a group name.
161 To specify a user or group named
168 To specify a group with the same name as a user, use the
172 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
175 The permissions to delegate.
176 Multiple permissions may be specified as a comma-separated list.
177 Permission names are the same as ZFS subcommand and property names.
178 See the property list below.
179 Property set names, which begin with
184 form below for details.
189 options are specified, or both are, then the permissions are allowed for the
190 file system or volume, and all of its descendents.
192 Permissions are generally the ability to use a ZFS subcommand or change a ZFS
194 The following permissions are available:
199 allow subcommand Must also have the permission that is being allowed
201 clone subcommand Must also have the \fBcreate\fR ability and \fBmount\fR ability in the origin file system
202 create subcommand Must also have the \fBmount\fR ability. Must also have the \fBrefreservation\fR ability to create a non-sparse volume.
203 destroy subcommand Must also have the \fBmount\fR ability
204 diff subcommand Allows lookup of paths within a dataset given an object number, and the ability to create snapshots necessary to \fBzfs diff\fR.
205 hold subcommand Allows adding a user hold to a snapshot
206 load-key subcommand Allows loading and unloading of encryption key (see \fBzfs load-key\fR and \fBzfs unload-key\fR).
207 change-key subcommand Allows changing an encryption key via \fBzfs change-key\fR.
208 mount subcommand Allows mounting/umounting ZFS datasets
209 promote subcommand Must also have the \fBmount\fR and \fBpromote\fR ability in the origin file system
210 receive subcommand Must also have the \fBmount\fR and \fBcreate\fR ability
211 release subcommand Allows releasing a user hold which might destroy the snapshot
212 rename subcommand Must also have the \fBmount\fR and \fBcreate\fR ability in the new parent
213 rollback subcommand Must also have the \fBmount\fR ability
215 share subcommand Allows sharing file systems over NFS or SMB protocols
216 snapshot subcommand Must also have the \fBmount\fR ability
218 groupquota other Allows accessing any \fBgroupquota@\fI…\fR property
219 groupobjquota other Allows accessing any \fBgroupobjquota@\fI…\fR property
220 groupused other Allows reading any \fBgroupused@\fI…\fR property
221 groupobjused other Allows reading any \fBgroupobjused@\fI…\fR property
222 userprop other Allows changing any user property
223 userquota other Allows accessing any \fBuserquota@\fI…\fR property
224 userobjquota other Allows accessing any \fBuserobjquota@\fI…\fR property
225 userused other Allows reading any \fBuserused@\fI…\fR property
226 userobjused other Allows reading any \fBuserobjused@\fI…\fR property
227 projectobjquota other Allows accessing any \fBprojectobjquota@\fI…\fR property
228 projectquota other Allows accessing any \fBprojectquota@\fI…\fR property
229 projectobjused other Allows reading any \fBprojectobjused@\fI…\fR property
230 projectused other Allows reading any \fBprojectused@\fI…\fR property
237 casesensitivity property
248 filesystem_limit property
256 normalization property
259 primarycache property
263 redundant_metadata property
265 refreservation property
269 secondarycache property
275 snapshot_limit property
276 special_small_blocks property
280 volblocksize property
291 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
293 .Ar filesystem Ns | Ns Ar volume
298 These permissions are granted
300 to the creator of any newly-created descendent file system.
304 .Fl s No @ Ns Ar setname
305 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
307 .Ar filesystem Ns | Ns Ar volume
309 Defines or adds permissions to a permission set.
310 The set can be used by other
312 commands for the specified file system and its descendents.
313 Sets are evaluated dynamically, so changes to a set are immediately reflected.
314 Permission sets follow the same naming restrictions as ZFS file systems, but the
317 and can be no more than 64 characters long.
322 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns …
323 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
324 .Ar setname Oc Ns … Oc
325 .Ar filesystem Ns | Ns Ar volume
331 .Fl e Ns | Ns Sy everyone
332 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
333 .Ar setname Oc Ns … Oc
334 .Ar filesystem Ns | Ns Ar volume
341 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
342 .Ar setname Oc Ns … Oc
343 .Ar filesystem Ns | Ns Ar volume
345 Removes permissions that were granted with the
348 No permissions are explicitly denied, so other permissions granted are still in
350 For example, if the permission is granted by an ancestor.
351 If no permissions are specified, then all permissions for the specified
363 only removes the permissions that were granted to everyone, not all permissions
364 for every user and group.
367 command for a description of the
372 Recursively remove the permissions from this file system and all descendents.
378 .Fl s No @ Ns Ar setname
379 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
380 .Ar setname Oc Ns … Oc
381 .Ar filesystem Ns | Ns Ar volume
383 Removes permissions from a permission set.
384 If no permissions are specified, then all permissions are removed, thus removing
389 .\" These are, respectively, examples 17, 18, 19, 20 from zfs.8
390 .\" Make sure to update them bidirectionally
391 .Ss Example 1 : No Delegating ZFS Administration Permissions on a ZFS Dataset
392 The following example shows how to set permissions so that user
394 can create, destroy, mount, and take snapshots on
399 .Bd -literal -compact -offset Ds
400 .No # Nm zfs Cm allow Sy cindys create , Ns Sy destroy , Ns Sy mount , Ns Sy snapshot Ar tank/cindys
401 .No # Nm zfs Cm allow Ar tank/cindys
402 ---- Permissions on tank/cindys --------------------------------------
403 Local+Descendent permissions:
404 user cindys create,destroy,mount,snapshot
409 mount point permission is set to 755 by default, user
411 will be unable to mount file systems under
413 Add an ACE similar to the following syntax to provide mount point access:
414 .Dl # Cm chmod No A+user : Ns Ar cindys Ns :add_subdirectory:allow Ar /tank/cindys
416 .Ss Example 2 : No Delegating Create Time Permissions on a ZFS Dataset
417 The following example shows how to grant anyone in the group
419 to create file systems in
421 This syntax also allows staff members to destroy their own file systems, but not
422 destroy anyone else's file system.
426 .Bd -literal -compact -offset Ds
427 .No # Nm zfs Cm allow Ar staff Sy create , Ns Sy mount Ar tank/users
428 .No # Nm zfs Cm allow Fl c Sy destroy Ar tank/users
429 .No # Nm zfs Cm allow Ar tank/users
430 ---- Permissions on tank/users ---------------------------------------
433 Local+Descendent permissions:
434 group staff create,mount
437 .Ss Example 3 : No Defining and Granting a Permission Set on a ZFS Dataset
438 The following example shows how to define and grant a permission set on the
444 .Bd -literal -compact -offset Ds
445 .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
446 .No # Nm zfs Cm allow staff No @ Ns Ar pset tank/users
447 .No # Nm zfs Cm allow Ar tank/users
448 ---- Permissions on tank/users ---------------------------------------
450 @pset create,destroy,mount,snapshot
451 Local+Descendent permissions:
455 .Ss Example 4 : No Delegating Property Permissions on a ZFS Dataset
456 The following example shows to grant the ability to set quotas and reservations
463 .Bd -literal -compact -offset Ds
464 .No # Nm zfs Cm allow Ar cindys Sy quota , Ns Sy reservation Ar users/home
465 .No # Nm zfs Cm allow Ar users/home
466 ---- Permissions on users/home ---------------------------------------
467 Local+Descendent permissions:
468 user cindys quota,reservation
469 cindys% zfs set quota=10G users/home/marks
470 cindys% zfs get quota users/home/marks
471 NAME PROPERTY VALUE SOURCE
472 users/home/marks quota 10G local
475 .Ss Example 5 : No Removing ZFS Delegated Permissions on a ZFS Dataset
476 The following example shows how to remove the snapshot permission from the
484 .Bd -literal -compact -offset Ds
485 .No # Nm zfs Cm unallow Ar staff Sy snapshot Ar tank/users
486 .No # Nm zfs Cm allow Ar tank/users
487 ---- Permissions on tank/users ---------------------------------------
489 @pset create,destroy,mount,snapshot
490 Local+Descendent permissions: