GNU bug report logs - #20884
copying NFS4 ACLs portably

Previous Next

Package: coreutils;

Reported by: Michael Stone <mstone <at> debian.org>

Date: Tue, 23 Jun 2015 16:03:03 UTC

Severity: normal

Full log


Message #8 received at 20884 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Michael Stone <mstone <at> debian.org>, 20884 <at> debbugs.gnu.org, 
 Andreas Gruenbacher <andreas.gruenbacher <at> gmail.com>
Subject: Re: bug#20884: copying NFS4 ACLs portably
Date: Tue, 23 Jun 2015 17:39:14 +0100
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. If cp 
> --preserve=xattr is used instead, then the ACL is preserved.
> 
>>From the comments in the source it looks as though the fchmod is set 
> after the xattrs are copied because the unix mode could interfere with 
> setting the xattrs. It's also possible that setting the mode before the 
> ACL could open up more permissions than desired. OTOH, blowing the ACL 
> away doesn't seem useful either. Since the issue arises on an NFS mount, 
> I don't see an obvious way to tailor the behavior to the platform. 
> 
> Am I missing anything in this diagnosis? Has this already been hashed 
> out (my google-fu is too weak to find relevant hits)? 
> 
> Mike Stone

There have been recent changes in this area,
so we need to know the version to help determine
if this is a regression or was always an issue.

Though the recent refactoring in this area in gnulib stated:

  "The Solaris and Cygwin code still uses duplicate code paths for setting
   a file mode while making sure that no acls exist and setting an explicit
   acl; this is no worse than before, but could be cleaned up. "

thanks,
Pádraig.




This bug report was last modified 10 years ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.