<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p class="western" style="font-weight: normal" lang="zxx">Thanks
Andy, for pointing that out. So it seems to be a "feature" of how
rsync handles permissions.<br>
I've been fiddling around with those rsync options, but I couldn't
get it right. That's not a biggy though, I'll take an other
approach: use rsync to copy the data over and afterwards correct
the ACLs on the target by running commands like:</p>
<p class="western" style="font-weight: normal" lang="zxx">"<font
color="#000000">find
<location> type -f -exec /usr/bin/chmod <file-ACLs>
&& find <location> type -d
-exec /usr/bin/chmod <dir-ACLs> && chmod
<file-and-dir-ACLs>"</font></p>
<p class="western" style="font-weight: normal" lang="zxx"><font
color="#000000">That will get me where I want to be.</font></p>
<p class="western" style="font-weight: normal" lang="zxx"><font
color="#000000">@Paul: both sides are indeed ZFS, but
send/receive in this case is not an option, as I'm trying to
split a large dataset (with a number of toplevel subdirectories)
into multiple smaller datasets (one per toplevel subdir). But
the above strategy will get me there, it just requires one extra
step.</font></p>
<p class="western" style="font-weight: normal" lang="zxx"><font
color="#000000">Cheers,<br>
Andries<br>
</font></p>
<br>
<div class="moz-cite-prefix">On 2018-03-09 9:59, Andy Fiddaman
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:nycvar.TFB.7.76.1803090855100.8876@erncre.pvgehf-vg.arg">
<pre wrap="">
On Thu, 8 Mar 2018, Paul B. Henson wrote:
; > From: Andries Annema
; > Sent: Thursday, March 8, 2018 8:06 AM
; >
; > But the issue seems unresolved when:
; >
; > - using rsync to copy stuff over from one dataset to another.
;
; I don't think rsync understands ZFS ACLs? So it is most likely trying to duplicate the mode bits while copying, using chmod...
rsync explicity does do that, it tries to make the permissions on the target
file match the source, including ACLs where it can (I'm also not sure if it
supports NFSv4 ACLs).
>From the man page:
To give new files the destination-default permissions,
make sure that the --perms option is off and use
--chmod=ugo=rwX (which ensures that all non-masked bits get
enabled).
So, give this a go:
rsync -a --no-p --no-g --chmod=ugo=rwX src/ dst/
The extra options need to come after -a.
Regards,
Andy
</pre>
</blockquote>
<br>
</body>
</html>