am I missing something, or are permissions always preserved?

Ben bench at tukati.com
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
permissions.

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

#ifdef HAVE_CHMOD
    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",
                    fname,strerror(errno));
                return 0;
            }
        }
    }
#endif

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