Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Aug 2021 21:44:51 -1000
From:      "parv/freebsd" <parv.0zero9+freebsd@gmail.com>
To:        freebsd-stable@freebsd.org
Subject:   Re: ZFS delegation- zfs send| zfs recv fails for not being able to unmount dataset as regular user
Message-ID:  <CABObuOoRhj3pcU0XugdvJ3jwF7XKAm15fg_PN2AXPhmw=LfGAQ@mail.gmail.com>
In-Reply-To: <CABObuOos%2BRAppkQ_NratTMMzNVx%2Bc9QT6=Jn4Dq3r9obWz=H%2Bw@mail.gmail.com>
References:  <CABObuOos%2BRAppkQ_NratTMMzNVx%2Bc9QT6=Jn4Dq3r9obWz=H%2Bw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000034866005c8f356f9
Content-Type: text/plain; charset="UTF-8"

On Thu, Aug 5, 2021 at 11:49 PM parv/freebsd wrote:

> How do I get around the the issue of normal user being unable to unmount
> the dataset ...
>
> # zfs send -R -v send-test/original@to-copy | zfs recv -F -d -v -s send-test-copy
> full send of send-test/original@to-copy estimated size is 51.1K
> total estimated size is 51.1K
> cannot unmount '/send-test-copy/original': permission denied
> warning: cannot send 'send-test/original@to-copy': Broken pipe
>
> ... so that the transfer would succeed?
>
>
After posting this, a thought had occurred to me that I might need to
set some MIB to allow non-root user to perform (un)mount.

Found the reason (vfs.usermount MIB was 0) & the solution (set the MIB to 1)
myself.

zfs-allow(8) manual page need to have a pointer to the above MIB.


- parv


> I am testing ZFS delegation on FreeBSD 13, with
>
> ...

> # zfs allow send-test-copy
> ---- Permissions on send-test-copy -----------------------------------
> Local+Descendent permissions:
>         user parv create,destroy,diff,hold,mount,promote,receive,release,send,snapshot
>
> # ll /send-test-copy
> total 10
> drwxr-xr-x   3 parv  parv   uarch  3 20210805.1741 ./
> drwxr-xr-x  25 root  wheel  uarch 31 20210805.1715 ../
> drwxr-xr-x   2 parv  parv   uarch  2 20210805.1741 original/
>
>
--

--00000000000034866005c8f356f9--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABObuOoRhj3pcU0XugdvJ3jwF7XKAm15fg_PN2AXPhmw=LfGAQ>