home | help
ZFS-ALLOW(1)		     General Commands Manual		    ZFS-ALLOW(1)

NAME
     zfs-allow -- terminal UI and CLI for ZFS delegated administration

SYNOPSIS
     zfs-allow [dataset]
     zfs-allow -list [-json] [dataset]
     zfs-allow -add who -perms perms [-scope scope] [-n | -y | -check] [dataset]
     zfs-allow -remove who [-perms perms] [-scope scope] [-r] [-n | -y | -check]
	       [dataset]
     zfs-allow -effective user [-json] [dataset]
     zfs-allow -where who [-json]
     zfs-allow -dump [-r] [dataset]
     zfs-allow -restore file [-n | -y | -check]
     zfs-allow -catalogue [-json]
     zfs-allow -version

DESCRIPTION
     zfs-allow	is  a front-end for zfs-allow(8): it shows the delegated permis-
     sions of a dataset the way `zfs allow' prints them, lets you edit them as a
     checklist in which every permission is described, and turns the edits  into
     the  exact  `zfs allow' and `zfs unallow' commands, shown for review before
     they run.	Pre-flight checks point out what the commands will not	achieve:
     a	create	without mount, vfs.usermount set to 0, a mount point the grantee
     cannot create directories in, and what an unprivileged operator may not do.

     Without options zfs-allow starts the interactive editor on dataset; without
     a dataset it first shows a picker of every file system and volume, with the
     dataset of the current directory preselected.  The options  below	are  the
     non-interactive  modes,  for  scripts  and  configuration management; there
     dataset defaults to the one the current directory	is  on.   dataset  is  a
     dataset  name,  or  a  path on a ZFS file system (the dataset holding it is
     used).

   Model
     A dataset's delegations consist of
     entries	  a user, a group or everyone, with the permissions  that  apply
		  to  the  dataset  itself  (`zfs allow -l') and the permissions
		  that apply to its descendants (`zfs allow  -d');  `zfs  allow'
		  prints their intersection as "Local+Descendent";
     sets	  named bundles (@name) that entries on this dataset and its de-
		  scendants can refer to;
     create-time  permissions  granted	locally to whoever creates a new descen-
		  dant file system.

     Entries of an ancestor that apply to descendants also apply here;	the  in-
     teractive i key lists them, and -effective takes them into account.

   Interactive keys
     enter, e	  edit the entry under the cursor
     a		  add an entry, create-time permissions or a permission set
     d		  delete the entry
     R		  revoke  the  entry  on this dataset and every descendant (`zfs
		  unallow -r')
     A		  apply: show the commands and the pre-flight  notes,  then  run
		  them
     u, r	  undo the last edit; reload from the kernel
     E		  effective permissions of a user here, with every source
     i		  the ancestors' delegations
     D		  switch dataset
     q, esc	  back	to the dataset list when the session started there, oth-
		  erwise quit
     ?, h	  help, key list

     In the editor: / filters the permissions by name or description, space tog-
     gles one permission (on a group header: the whole group), enter toggles and
     moves down, a and n select all or none of the shown permissions, p loads  a
     preset,  x  shows	the permissions FreeBSD refuses, ctrl+s confirms and esc
     cancels.

OPTIONS
     -list   Print the delegations of the dataset and  of  every  ancestor  that
	     delegates anything, in `zfs allow' format.

     -add who -perms perms
	     Grant  perms  to who.  who is user:NAME, group:NAME, everyone, @SET
	     (define or extend a permission set) or  create-time.   perms  is  a
	     comma-separated  list  of	permission names, permission sets (@SET)
	     and presets (+PRESET); -catalogue lists them all.

     -remove who [-perms perms]
	     Revoke perms (or everything without -perms) from who.  With -r  the
	     revocation  is done with `zfs unallow -r', on the dataset and every
	     descendant.

     -scope scope
	     With -add and -remove: both  (the	default:  the  dataset	and  its
	     descendants,   `zfs  allow  without  -l  or  -d'),  local	(-l)  or
	     descendants (-d).

     -n      Print the `zfs' commands and the pre-flight notes	without  running
	     them.

     -y      Run the commands without asking.

     -check  Dry  run  that  exits  3  if anything would change and 0 if nothing
	     would.

     -effective user
	     Print what user may do on the dataset:  their  own  entries,  their
	     groups',  everyone's, and the descendant entries of every ancestor,
	     with permission sets expanded and every source listed.

     -where who
	     List every dataset on the system that delegates anything to who.

     -dump   Print a JSON snapshot of the  dataset's  delegations;  with  -r  of
	     every descendant's too.

     -restore file
	     Bring  every  dataset  recorded  in  a  -dump  snapshot back to the
	     recorded delegations; datasets that no  longer  exist  are  skipped
	     with a warning.  -n, -y and -check apply.

     -catalogue
	     Print every permission with its kind (subcommand, other, property),
	     group and description, and the presets.

     -json   JSON output for -list, -effective, -where, -catalogue and -n.

     -lenient
	     Accept  permission  names	that  are  not in the catalogue (a newer
	     OpenZFS may know more).

     -version
	     Print the version and exit.

EXIT STATUS
     0 on success; 1 on error (including a refused `zfs command');  2  when  the
     confirmation was declined; 3 when -check found pending changes.

EXAMPLES
     Preview  the  commands  that  give bob the snapshot preset plus send on his
     home dataset:

	   $ zfs-allow -add user:bob -perms +snapshots,send -n tank/home/bob
	   zfs allow -u bob bookmark,destroy,diff,hold,mount,release,rollback,send,snapshot tank/home/bob
	   note: vfs.usermount is 0: unprivileged users cannot mount, so mount and everything that needs it ... will fail

     Revoke everything from a departed user on a whole subtree:

	   # zfs-allow -remove user:bob -r -y tank/home

     Keep the delegations of a subtree under configuration management:

	   # zfs-allow -dump -r tank/home > delegations.json
	   # zfs-allow -restore delegations.json -check || zfs-allow -restore delegations.json -y

SEE ALSO
     facl(1), zfs(8), zfs-allow(8)

CAVEATS
     Delegated permissions never override the mount point: to create  file  sys-
     tems  a  user  also needs to create directories in the parent's mount point
     (chown it, or grant add_subdirectory  with  an  NFSv4  ACL).   Unprivileged
     mounting needs vfs.usermount=1.

     An  unprivileged user who holds the allow permission can delegate what they
     hold themselves, but can `zfs unallow' only their own  entries  and  cannot
     define permission sets; the pre-flight says so before the commands run.

     mlslabel  and  zoned  are	refused on FreeBSD ("operation not applicable to
     datasets of this type"), the same message an unknown permission name gets.

     `zfs allow' has no machine-readable  output;  zfs-allow  parses  its  text,
     which has been stable since Solaris.

FreeBSD ports 15.quarterly	 August 23, 2026		    ZFS-ALLOW(1)

home | help