Bug: Loosing Group Permissions in Archive Mode with Sticky Bit and ACL Mask
Phillip Kuhrt
pku at codemanufaktur.com
Fri Jun 15 21:15:51 UTC 2018
Hello,
I currently try to copy a directory locally between two ext4 filesystems
while preserving permissions and ACLs using the -aAX options. Under some
conditions, rsync does not copy the posix permissions completely, it
changes the group::rwx to a group::--- permission. The latest rsync
available on Debian Jessie is 3.1.1, but the changelog for 3.1.2 and 3.1.3
did not seem to mention such a bug being fixed.
As far as I tried, this bug stops occurring when I:
* remove the sticky bit from skel/subdir ("chmod -t")
* remove the rwx mask from skel/subdir ("setfacl -x m::"), which setfacl
creates when adding the user object permission
Here an example:
// OS: Debian GNU/Linux 8 (jessie)
// apt list: rsync/oldstable,now 3.1.1-3+deb8u1 amd64 [installed,automatic]
// long command:
// 1. remove skel3/
// 2. recreate skel3/ from skel/ using rsync
// 3. diff the acls on the subfolder
// first: without sticky bit
root@:/etc# rm skel3 -r ; rsync -aAX skel/ skel3 ; diff -y <(getfacl
skel/subdir/) <(getfacl skel3/subdir)
# file: skel/subdir/ | # file:
skel3/subdir
# owner: skeluser # owner:
skeluser
# group: skelgroup # group:
skelgroup
user::rwx user::rwx
user:skeluser:rwx
user:skeluser:rwx
group::rwx group::rwx
mask::rwx mask::rwx
other::--- other::---
default:user::rwx
default:user::rwx
default:user:skeluser:rwx
default:user:skeluser:rwx
default:group::---
default:group::---
default:mask::rwx
default:mask::rwx
default:other::---
default:other::---
// then: with sticky bit
root@:/etc# chmod +t skel/subdir/
root@:/etc# rm skel3 -r ; rsync -aAX skel/ skel3 ; diff -y <(getfacl
skel/subdir/) <(getfacl skel3/subdir)
# file: skel/subdir/ | # file:
skel3/subdir
# owner: skeluser # owner:
skeluser
# group: skelgroup # group:
skelgroup
# flags: --t # flags: --t
user::rwx user::rwx
user:skeluser:rwx
user:skeluser:rwx
group::rwx | group::---
mask::rwx mask::rwx
other::--- other::---
default:user::rwx
default:user::rwx
default:user:skeluser:rwx
default:user:skeluser:rwx
default:group::---
default:group::---
default:mask::rwx
default:mask::rwx
default:other::---
default:other::---
// directory above:
root@:/etc# getfacl skel
# file: skel
# owner: root
# group: root
user::rwx
group::r-x
other::r-x
Best regards
Phillip Kuhrt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20180615/0b7d5480/attachment.html>
More information about the rsync
mailing list