X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/77ed253c73f5a215014a50e6f9c9f81b8b3b4c42..662127e6c73dee8e739eb7f3bcb0cba0bc890d3e:/rsync.yo diff --git a/rsync.yo b/rsync.yo index e0484ca7..9ccd6ad0 100644 --- a/rsync.yo +++ b/rsync.yo @@ -702,18 +702,22 @@ such as bf(cp)(1) and bf(tar)(1). In summary: to give destination files (both old and new) the source permissions, use bf(--perms). To give new files the destination-default -permissions (while leaving existing files unchanged) make sure that the +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 (this defines the bf(-s) option, +and includes --no-g to use the default group of the destination dir): -quote(tt( rsync alias -s --no-p --chmod=ugo=rwX)) +quote(tt( rsync alias -s --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/)) +(Caveat: make sure that bf(-a) does not follow bf(-s), or it will re-enable +the "--no-*" options.) + 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 versions erroneously preserved the three special permission bits for