[Bug 11545] New: -A (preserve ACLs) with --link-dest=DIR fails when DIR has a directory with the same file's name

samba-bugs at samba.org samba-bugs at samba.org
Wed Oct 7 13:59:20 UTC 2015


https://bugzilla.samba.org/show_bug.cgi?id=11545

            Bug ID: 11545
           Summary: -A (preserve ACLs) with --link-dest=DIR fails when DIR
                    has a directory with the same file's name
           Product: rsync
           Version: 3.1.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
          Assignee: wayned at samba.org
          Reporter: famzah at famzah.net
        QA Contact: rsync-qa at samba.org

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 at 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 at 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 at 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 at 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 at 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]

-- 
You are receiving this mail because:
You are the QA Contact for the bug.



More information about the rsync mailing list