--link-dest mostly useless on a server without chroot
Andrew Pimlott
andrew at pimlott.net
Fri Mar 26 05:09:08 GMT 2004
When using the rsync server without chroot, the --link-dest and
--compare-dest options are almost useless. This is because
sanitize_paths is called on the link-dest directory, stripping out
leading dots and slashes. Thus, the only possiblitiy for a link-dest
directory is under the target directory, which is generally not useful.
There doesn't seem to be an easy fix. sanitize_paths is applied
indiscriminately to all arguments, so in order to give link-dest
directory special treatment, the code would have to be restructured.
Maybe someone can think of a clever solution.
As for work-arounds, I can't use chroot, because the server is running
as my user account. However, I can arrange for the link-dest directory
to be under the target directory, using a symlink if necessary. Then, I
can use a relative link-dest option, and avoid getting mangled by
sanitize_paths.
Finally, the effects of sanitize_paths are not documented, leading to a
mystified and frustrated user. --compare-dest and --link-dest should
mention that only relative paths without dots will work when using an
rsync server without chroot.
Andrew
More information about the rsync
mailing list