Subject: Re: bug#20884: copying NFS4 ACLs portably

From: Andreas Grünbacher <[email-masked]>
Date: Tue, 23 Jun 2015 19:05:43 +0200

I assume we are talking about a Linux client with NFSv4 in all cases.
If so, then
the Solaris code isn't going to be used.

What does strace show?

2015-06-23 18:39 GMT+02:00 Pádraig Brady <[email-masked]>:
>
> On 23/06/15 17:02, Michael Stone wrote:
> > I'm looking for some information before I run too far down this rathole.
> > Currently cp --preserve=all will attempt to preserve both the unix modes and
> > any ACL on a file. This seems to be working entirely as expected with a
> > linux NFS4 client & server. If I attempt the same using a solaris
> > server, the new file does not have the ACL. The problem appears to be
> > that the fchmod run after the ACL is copied clears the ACL.

A chmod / fchmod shouldn't clear the acl, it should only disable the permissions
not allowed by the mode. IIRC Solaris has some weird configuration knobs for
those kinds of things though.

Recent coreutils should usually only chmod to set the suid, sgid, or
stick flags,
or when setting acls doesn't work.

> If cp --preserve=xattr is used instead, then the ACL is preserved.

That would be a misbehavior / misconfiguration; --preserve=xattr should affect
non-permission xattrs only. Which attributes are permissions and which
are not is
configured in /etc/xattr.conf.

Andreas