Bug 11545 - -A (preserve ACLs) with --link-dest=DIR fails when DIR has a directory with the same file's name
-A (preserve ACLs) with --link-dest=DIR fails when DIR has a directory with t...
Status: NEW
Product: rsync
Classification: Unclassified
Component: core
3.1.0
All All
: P5 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-07 13:59 UTC by Ivan Zahariev
Modified: 2015-11-24 12:45 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zahariev 2015-10-07 13:59:20 UTC
A few lines of code speak for dozens of words:

[code]

TESTDIR=~/rsync-link-bug

mkdir "$TESTDIR"
cd "$TESTDIR"

# populate source data
mkdir data
touch data/file.txt

getfacl data/file.txt # make sure you support ACL

# populate backup data
for i in 0 1 ; do mkdir backup.$i backup.$i/data ; done
touch backup.0/data/file.txt # create file
mkdir backup.1/data/file.txt # create directory with the same name

# reproduce the bug
rsync -a -A --link-dest "$TESTDIR/backup.1" "$TESTDIR/data" "$TESTDIR/backup.0"

[/code]

This bug affects rsync 3.1.0+ including the "dev" version:

[code]

famzah@vbox:~/rsync-link-bug$ ~/a/rsync/rsync-3.0.9/rsync -a -A --link-dest "$TESTDIR/backup.1" "$TESTDIR/data" "$TESTDIR/backup.0"
# 3.0.9: OK, no error; works as expected

famzah@vbox:~/rsync-link-bug$ ~/a/rsync/rsync-3.1.1/rsync -a --link-dest "$TESTDIR/backup.1" "$TESTDIR/data" "$TESTDIR/backup.0"
# 3.1.1: without "-A" works OK too

[/code]

Versions 3.1.0, 3.1.1 and 3.1.2pre1 are affected:

[code]

famzah@vbox:~/rsync-link-bug$ ~/a/rsync/rsync-HEAD-20150824-1905GMT/rsync -a -A --link-dest "$TESTDIR/backup.1" "$TESTDIR/data" "$TESTDIR/backup.0"
rsync: get_acl: sys_acl_get_file(data/file.txt, ACL_TYPE_DEFAULT): Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2pre1]

famzah@vbox:~/rsync-link-bug$ ~/a/rsync/rsync-3.1.1/rsync -a -A --link-dest "$TESTDIR/backup.1" "$TESTDIR/data" "$TESTDIR/backup.0"
rsync: get_acl: sys_acl_get_file(data/file.txt, ACL_TYPE_DEFAULT): Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1165) [sender=3.1.1]

famzah@vbox:~/rsync-link-bug$ ~/a/rsync/rsync-3.1.0/rsync -a -A --link-dest "$TESTDIR/backup.1" "$TESTDIR/data" "$TESTDIR/backup.0"
rsync: get_acl: sys_acl_get_file(data/file.txt, ACL_TYPE_DEFAULT): Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1165) [sender=3.1.0]

[/code]
Comment 1 Iavor Stoev 2015-11-24 12:45:01 UTC
Hello, 

Is there any development on that bug? 

I've encountered the same issue. 

Regards