NFS4 extended attributes confusion
Michal Ruprich
michalruprich at gmail.com
Thu Jul 25 14:50:00 UTC 2019
Hi,
would someone please clarify the behavior of -X --filter='some_filter'
to me? I was trying to copy a file on a NFS4 mount and some extended
attributes get transferred only when run as a normal user with --super
but not as root. If I have a file on nfs4 mount and I set some extended
attributes like this:
#rsync --version
rsync version 3.1.3 protocol version 31
Copyright (C) 1996-2018 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, iconv, symtimes, prealloc
...
# nfs4_setfacl -a A::root at localhost:rwaxtcy
/tmp/nfs_test_mountpoint/test_file
# nfs4_setfacl -a A::testuser at localhost:rwaxtcy
/tmp/nfs_test_mountpoint/test_file
# nfs4_getfacl /tmp/nfs_test_mountpoint/test_file
# file: /tmp/nfs_test_mountpoint/test_file
D::OWNER@:x
A::OWNER@:rwatTcCy
A::0:rwaxtcy <---------------
A::1000:rwaxtcy <--------------
A::GROUP@:rwatcy
A::EVERYONE@:rtcy
Then when I use rsync, different attributes are copied when running as
testuser or root:
ROOT:
# rsync -X --filter='-x! system.nfs4_acl'
/tmp/nfs_test_mountpoint/test_file
/tmp/nfs_test_mountpoint/test_file_synced_root
# nfs4_getfacl /tmp/nfs_test_mountpoint/test_file_synced_root
D::OWNER@:x
A::OWNER@:rwatTcCy
A::0:rxtcy <-------
A::1000:rxtcy <-------
A::GROUP@:rtcy
A::EVERYONE@:rtcy
TESTUSER:
# rsync --super -X --filter='-x! system.nfs4_acl'
/tmp/nfs_test_mountpoint/test_file
/tmp/nfs_test_mountpoint/test_file_synced_user
# nfs4_getfacl /tmp/nfs_test_mountpoint/test_file_synced_user
D::OWNER@:x
A::OWNER@:rwatTcCy
A::0:rwaxtcy <---------
A::1000:rwaxtcy <-------
A::GROUP@:rwatcy
A::EVERYONE@:rtcy
I am really confused as to why the 'wa' attributes get transferred when
initiated as a normal user but not as root. Could anyone bring some
light into this for me?
Thanks.
Michal
More information about the rsync
mailing list