ZFS Delegating ZFS Permissions for ZFS volume fails

While creating a zfs filesystem by a delegated user works fine,
creating a zfs(8) volume fails
Code:
# zfs allow mypool
---- Permissions on mypool --------------------------------------------
Permission sets:
	@container clone,create,destroy,mount,mountpoint,promote,reservation,rollback,snapshot,volblocksize,volsize

# zfs create mypool/container
# zfs allow -u myuser @container mypool/container
# su myuser

$ zfs allow mypool/container
---- Permissions on mypool/container ----------------------------------
Local+Descendent permissions:
	user myuser @container
---- Permissions on mypool --------------------------------------------
Permission sets:
	@container clone,create,destroy,mount,mountpoint,promote,reservation,rollback,snapshot,volblocksize,volsize

$ zfs create -o mountpoint=legacy mypool/container/myfilesystem
$ zfs list -r mypool/container
NAME                            USED  AVAIL  REFER  MOUNTPOINT
mypool/container                192K  50,3G    96K  /mypool/container
mypool/container/myfilesystem    96K  50,3G    96K  legacy

$ zfs create -V 128m mypool/container/myvolume
cannot create 'mypool/container/myvolume': permission denied

:( What's missing here?
 
I just tried the same, and once the ZFS volume is created as root all your user-delegated permissions should work on the volume itself. My guess is that you can't create the volume as a regular user because doing so requires the creation of a special character device in /dev/zvol, which has some strict permissions.

You'll need to be root to partition and format the volume anyway, so I'm not sure this would count as a "bug." Just something that has to be dealt with.
 
Back
Top