Permissions of the top-level destination directory without --perms

Matt McCutchen hashproduct+rsync at
Sat Feb 17 15:29:07 GMT 2007

On 2/17/07, Paul Slootman <paul at> wrote:
> Actually, I find the above behaviour to be what I'd expect;
> after all, you're telling it to transfer the contents of src, not src
> itself; and dest is an implied directory, and created with default
> permissions.

No, I think the Usage section of the man page makes it abundantly
clear that rsync is supposed to copy the attributes of the top-level
source directory to the top-level destination directory:

"...In other words, each of the following commands copies the files in
the same way, including their setting of the attributes of /dest/foo:
    rsync -av /src/foo /dest
    rsync -av /src/foo/ /dest/foo "

(Note that "foo" in the second command plays the role of my "src" and "dest".)

An "implied directory" is one that is not included in the file list.
But as you can see by adding --list-only, the top-level directory "."
is included in the file list:

rsync -r --list-only src/ dest/
drwx------          72 2007/02/16 18:02:20 .
drwx------          48 2007/02/16 18:02:20 foo


More information about the rsync mailing list