am I missing something, or are permissions always preserved?

Ben bench at
Sat Dec 21 20:32:01 EST 2002

They seem to be for me, even when I don't pass in the --perms flag. This
is a problem because I'm rsyncing to a samba mount with fixed

Looking at rsync.c (for version 2.5.5) starting at line 204, I see this
code snippet:

    if (!S_ISLNK(st->st_mode)) {
        if (st->st_mode != file->mode) {
            updated = 1;
            if (do_chmod(fname,file->mode) != 0) {
                rprintf(FERROR,"failed to set permissions on %s : %s\n",
                return 0;

I would have expected to see a test for the setting of perserve_perms,
but it's not there. Is this a bug or is there there a reason
perserve_perms isn't checked?

More information about the rsync mailing list