https://bugzilla.samba.org/show_bug.cgi?id=3543

           Summary: [ACL] rsync calls default_perms_for_dir on omitted
                    implied dirs before ensuring they exist
           Product: rsync
           Version: 2.6.7
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: core
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [EMAIL PROTECTED]


Run the following in an empty directory:
    mkdir a
    touch a/b
    rsync --relative --no-implied-dirs a/b dest/

The following error messages result (my indentation):
    default_perms_for_dir: sys_acl_get_file(a, SMB_ACL_TYPE_DEFAULT):
        No such file or directory, falling back on umask
    default_perms_for_dir: sys_acl_get_file(a, SMB_ACL_TYPE_DEFAULT):
        No such file or directory, falling back on umask
    rsync error: some files could not be transferred (code 23) at main.c(882)
        [sender]

The trouble is that rsync is asking for the default permissions of dest/a
before dest/a has been created.  Moving the calculation of destination default
permissions later in recv_generator, after the creation of implied directories,
would probably fix the problem, but I'm not familiar enough with the logic of
that 520-line function to know where to put it.

Separating this calculation from the fuzzy list calculation would also fix what
appears to be a logic error.  If --fuzzy is given and --perms is not given and
the first file to be received into a directory is not a regular file,
parent_dirname will be set to the directory but the fuzzy list will not be
updated.  When rsync does receive a regular file into the directory, it will
assume the fuzzy list does not need to be updated and use the wrong list.


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to