X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/6a85ee9623f40afa976e2cbe6ced5529c509a3c7..58b7b3d668bd95e7552eb285c6e1e17de2b7b233:/rsync.yo diff --git a/rsync.yo b/rsync.yo index 4563866a..df37b182 100644 --- a/rsync.yo +++ b/rsync.yo @@ -801,6 +801,14 @@ directory, and receives the file into the new directory. With bf(--keep-dirlinks), the receiver keeps the symlink and "file" ends up in "bar". +One note of caution: if you use bf(--keep-dirlinks), you must trust all +the symlinks in the copy! If it is possible for an untrusted user to +create their own symlink to any directory, the user could then (on a +subsequent copy) replace the symlink with a real directory and affect the +content of whatever directory the symlink references. For backup copies, +you are better off using something like a bind mount instead of a symlink +to modify your receiving hierarchy. + See also bf(--copy-dirlinks) for an analogous option for the sending side. dit(bf(-H, --hard-links)) This tells rsync to look for hard-linked files in @@ -846,17 +854,17 @@ permissions (while leaving existing files unchanged), make sure that the bf(--perms) option is off and use bf(--chmod=ugo=rwX) (which ensures that all non-masked bits get enabled). If you'd care to make this latter behavior easier to type, you could define a popt alias for it, such as -putting this line in the file ~/.popt (this defines the bf(-s) option, +putting this line in the file ~/.popt (the following defines the bf(-Z) option, and includes --no-g to use the default group of the destination dir): -quote(tt( rsync alias -s --no-p --no-g --chmod=ugo=rwX)) +quote(tt( rsync alias -Z --no-p --no-g --chmod=ugo=rwX)) You could then use this new option in a command such as this one: -quote(tt( rsync -asv src/ dest/)) +quote(tt( rsync -avZ src/ dest/)) -(Caveat: make sure that bf(-a) does not follow bf(-s), or it will re-enable -the "--no-*" options.) +(Caveat: make sure that bf(-a) does not follow bf(-Z), or it will re-enable +the two "--no-*" options mentioned above.) The preservation of the destination's setgid bit on newly-created directories when bf(--perms) is off was added in rsync 2.6.7. Older rsync