samba-bugs@samba.org
2006-Feb-24 00:59 UTC
DO NOT REPLY [Bug 3549] New: rsync applies umask to some directories even when a default ACL takes effect
https://bugzilla.samba.org/show_bug.cgi?id=3549 Summary: rsync applies umask to some directories even when a default ACL takes effect Product: rsync Version: 2.6.7 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P3 Component: core AssignedTo: wayned@samba.org ReportedBy: hashproduct@verizon.net QAContact: rsync-qa@samba.org Starting in a new, empty directory with ACLs supported, run: umask 0077 setfacl -dm u::rwx,g::rwx,o::rwx . mkdir src touch src/foo rsync --relative --no-implied-dirs src/foo dest/ Rsync creates dest/src with 700 permissions even though the default ACL specifies 777 permissions. The trouble is that the receiving rsync restricts the mode of such "auxiliary directories" as omitted implied directories and directories created on the way to the backup directory. The receiving rsync runs with umask 0 and thus applies the umask to the permissions it gives to mkdir; if the new directory's containing directory is a default ACL, mkdir will apply the default ACL automatically, but the umask should not be applied. The correct technique, which is already used in get_local_name to create a top-level destination directory outside the transfer, is to set the umask back to the original umask temporarily and pass 0777 to mkdir. The patch I will soon attach factors this technique out into a function do_mkdir_defmode in util.c and changes both the current get_local_name code and calls to do_mkdir(x, 0777 & ~orig_umask) to calls to do_mkdir_defmode(x). Even though the patch is only needed in the presence of ACLs, it does not mention ACLs itself, so it can be applied to the trunk. -- 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.
samba-bugs@samba.org
2006-Feb-24 01:00 UTC
DO NOT REPLY [Bug 3549] rsync applies umask to some directories even when a default ACL takes effect
https://bugzilla.samba.org/show_bug.cgi?id=3549 ------- Comment #1 from hashproduct@verizon.net 2006-02-23 18:59 MST ------- Created an attachment (id=1756) --> (https://bugzilla.samba.org/attachment.cgi?id=1756&action=view) Uses a new function do_mkdir_defmode to create some directories -- 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.
samba-bugs@samba.org
2006-Feb-24 02:08 UTC
DO NOT REPLY [Bug 3549] rsync applies umask to some directories even when a default ACL takes effect
https://bugzilla.samba.org/show_bug.cgi?id=3549 wayned@samba.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #2 from wayned@samba.org 2006-02-23 20:07 MST ------- This is a nice, simple bugfix/cleanup. Committing to the trunk. Thanks again! -- 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.
Seemingly Similar Threads
- DO NOT REPLY [Bug 3542] New: "rsync --list-only a b/" tries to create b
- Should umask takes effect when we create device file via mknod?
- get_local_name
- DO NOT REPLY [Bug 4080] New: rsync can't find basis dirs with -n and nonexistent destination
- Not preserving permissions really preserves some