16.04 - How to let non root user take ZFS snapshot? - Ask Ubuntu
i trying let non root user create zfs snapshots.
i've created permission set , given appropriate user privileges defined in it:
root@computer:~# zfs allow homepool/myuser ---- permissions on homepool/myuser ----------------------------------- permission sets: @myuser_allowed mount,snapshot local+descendent permissions: user myuser @myuser_allowed
but when try create snapshot following error:
root@computer:~# su - myuser myuser@computer:~$ /sbin/zfs snapshot homepool/myuser@`date +%f_%r` permission denied zfs utilities must run root.
creating snapshot root works expected:
root@computer:~# zfs snapshot homepool/myuser@`date +%f_%r` root@computer:~# zfs list -t snapshot name used avail refer mountpoint homepool/myuser@2016-10-30_19:01 44k - 5,32g - homepool/myuser@2016-10-30_19:37 0 - 5,32g -
do need add else permission set? or privileges on zfs binary?
root@computer:~# ls -l `which zfs` -rwxr-xr-x 1 root root 103352 okt 5 15:05 /sbin/zfs
applying privileges described here works no better:
root@computer:~# zfs allow -s @myuser_allowed create,mount,snapshot,clone,promote homepool/myuser root@computer:~# zfs allow homepool/myuser ---- permissions on homepool/myuser ----------------------------------- permission sets: @myuser_allowed clone,create,mount,promote,snapshot local+descendent permissions: user myuser @myuser_allowed root@computer:~# su - myuser myuser@computer:~$ /sbin/zfs snapshot homepool/myuser@`date +%f_%r` permission denied zfs utilities must run root.
it seems zfs allow
support added feature in (the still not released) zol 0.7.0
.
judging names of installed packages (why can't zfs --version
?):
# dpkg-query --list | grep -i zfs ii libzfs2linux 0.6.5.6-0ubuntu14 amd64 native openzfs filesystem library linux ii libzpool2linux 0.6.5.6-0ubuntu14 amd64 native openzfs pool library linux ii zfs-doc 0.6.5.6-0ubuntu14 native openzfs filesystem documentation , examples. ii zfs-zed 0.6.5.6-0ubuntu14 amd64 openzfs event daemon (zed) ii zfsutils-linux 0.6.5.6-0ubuntu14 amd64 native openzfs management utilities linux
ubuntu 16.04 seem running version 0.6.5
of zfs on linux.
that's explanation why not working me. error message could've been more explicit imho.
Comments
Post a Comment