The Samba-Bugzilla – Bug 3839
The '/' in the Softlink is missing on the remote Rsyncd server !
Last modified: 2006-10-15 13:26:34 UTC
When I use rsync with "-l" to backup some softlinks to the remote Rsyncd server, the '/' in all softlink files on the remote server has been removed. For example: The softlink "test2.txt -> /home/louie/test.txt" will become to "test2.txt -> home/louie/test.txt" on the remote server. Therefore, the OS cannot locate the right location due to missing '/' when I recover this softlink from the remote server to the local machine.
Do you know if there is any method to fix this problem ?
Best Regards. Louie
This has been fixed in the CVS version for a while now, which you can try out via the "nightly" tar files. This sanitizing of symlinks as they get expanded is still pretty new, so it would help if folks beat on the code to see if there are any places where a symlink could escape the top of the module's hierarchy that aren't handled yet.
You can also avoid the problem with any rsync by turning chroot on in the config file.
(In reply to comment #1)
> This has been fixed in the CVS version for a while now, which you can try out
> via the "nightly" tar files. This sanitizing of symlinks as they get expanded
> is still pretty new, so it would help if folks beat on the code to see if there
> are any places where a symlink could escape the top of the module's hierarchy
> that aren't handled yet.
Thanks for your kind reply !
Can you tell me which version of rsync has fixed this problem ?
'cos I can find that the man page for rsync v2.6.4-3 is still telling us that it will still remove the leading slashes in all symbollinks. See below:
If "use chroot" is true, the rsync server will chroot to the
"path" before starting the file transfer with the client. This
has the advantage of extra protection against possible implemen-
tation security holes, but it has the disadvantages of requiring
super-user privileges, of not being able to follow symbolic
links that are either absolute or outside of the new root path,
and of complicating the preservation of usernames and groups
(see below). When "use chroot" is false, for security reasons,
symlinks may only be relative paths pointing to other files
within the root path, and leading slashes are removed from most
absolute paths (options such as --backup-dir, --compare-dest,
etc. interpret an absolute path as rooted in the moduleâ€™s "path"
dir, just as if chroot was specified). The default for "use
chroot" is true.
> You can also avoid the problem with any rsync by turning chroot on in the
> config file.
It works for my current version after I have turned chroot on.
Best Regards. Louie
(In reply to comment #2)
> Can you tell me which version of rsync has fixed this problem ?
The problem was fixed in the CVS after the release of 2.6.8, which means that the only way you can get a fixed rsync is to compile it yourself from the source code in CVS. To get the source, you can either check out the source code from CVS or download and unpack the nightly tar file, as Wayne mentioned:
Then ./configure, make, su -c 'make install'.