Andrew Pimlott
2004-Mar-26 05:09 UTC
--link-dest mostly useless on a server without chroot
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
On Fri, Mar 26, 2004 at 12:09:08AM -0500, Andrew Pimlott wrote:> 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.Yes, those options should really replace "/" with the root dir of the module when chroot isn't specified (rather than just stripping the slash off). ..wayne..