Bug Report rsync 2.5.5 --delete and soft links to parent directories causes MAXSYMLINKS error

Kevin Earls kevin at ti.com
Tue Sep 17 21:56:00 EST 2002


I have found an unwanted feature of rsync 2.5.5.  It has to do with
soft links and the --delete option in archive mode. The following shows
how to reproduce the error.


Provide a soft link that refers to a parent directory.

%> /bin/ls -lR /tmp/src
/tmp/src:
total 16
  16 drwxrwxr-x   2 wke      sys_admin     239 Sep 17 16:18 dir1/

/tmp/src/dir1:
total 32
  16 lrwxrwxrwx   1 wke      sys_admin       2 Sep 17 16:17 dir2 -> ../


The command rsync -Pva --copy-unsafe-links /tmp/src/ /tmp/dst
works as expected.

When the --delete option is specified and the destination dir is a copy
of the source dir, the command fails.

%> rsync -Pva --delete --copy-unsafe-links /tmp/src/ /tmp/dst
building file list ... 
3 files to consider
readlink dir1/dir2/dir1/dir2/...(editted for line length)...dir1/dir2:
Number of symbolic links encountered during path name traversal exceeds
MAXSYMLINKS
delete_one: rmdir dir1/dir2/dir2/...(editted).../dir1/dir2/dir1/dir2:
Not a directory
... (walks down from MAXSYMLINKS)
delete_one: rmdir dir1/dir2/dir1/dir2/dir1/dir2: Not a directory
delete_one: rmdir dir1/dir2/dir1/dir2: Not a directory
wrote 114 bytes  read 20 bytes  268.00 bytes/sec
total size is 2  speedup is 0.10
rsync error: partial transfer (code 23) at main.c(578)
Exit 23

%> uname -a
SunOS odin 5.7 Generic_106541-19 sun4u sparc SUNW,Ultra-5_10

%> rsync --version
rsync  version 2.5.5  protocol version 26
Copyright (C) 1996-2002 by Andrew Tridgell and others
<http://rsync.samba.org/>
Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles, 
              no IPv6, 64-bit system inums, 64-bit internal inums

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.


-- 
Kevin Earls                    Email:  kevin at ti.com
Texas Instruments              Voice:  (903) 868-7208
6412 Hwy 75 South M/S 802      Pager:  (903) 620-2067
Sherman, TX 75090                FAX:  (903) 868-5616



More information about the rsync mailing list