Bug 12132 - Error on attributes when directory read-only
Summary: Error on attributes when directory read-only
Status: NEW
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.2
Hardware: All Mac OS X
: P5 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-08 17:43 UTC by dan+mozilla
Modified: 2016-08-08 17:53 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dan+mozilla 2016-08-08 17:43:46 UTC
When making an rsync of a directory with mode 0555 and attributes,
there is an error on any included file creation: 

failed: Permission denied (13)

Smallest test directory:

#   coriolis:/tmp/test  % ls -@alO
total 0
drwxr-xr-x   4 dan   wheel  - 136 Aug  8 19:16 .
drwxrwxrwt  15 root  wheel  - 544 Aug  8 19:01 ..
dr-xr-xr-x@  2 dan   wheel  - 102 Aug  8 17:54 dir+attr
        com.apple.FinderInfo     32 
dr-xr-xr-x   2 dan   wheel  - 102 Aug  8 19:13 dir+noattr



0.  Versions in use

Note: this is note the installed version with MacOS X (2.6.9) but
the latest one built from MacPorts (3.1.2).

The OS is OS X 10.10.5 (on source and destination)

rsync --version
rsync  version 3.1.2  protocol version 31
Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, symtimes, no prealloc, file-flags,
    HFS-compression

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

ssh doppler /opt/local/bin/rsync --version
rsync  version 3.1.2  protocol version 31
Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, symtimes, no prealloc, file-flags,
    HFS-compression

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.



1.  Case with the directory without attributes

#   coriolis:/tmp/test  % rsync -aArvX --rsync-path=/opt/local/bin/rsync dir+noattr doppler:/tmp
sending incremental file list
dir+noattr/
dir+noattr/index.xml.gz

sent 102,608 bytes  received 39 bytes  41,058.80 bytes/sec
total size is 102,449  speedup is 1.00



2.  Case with the directory with attributes

#   coriolis:/tmp/test  % rsync -aArvX --rsync-path=/opt/local/bin/rsync dir+attr doppler:/tmp 
sending incremental file list
dir+attr/
dir+attr/index.xml.gz
rsync: mkstemp "/tmp/dir+attr/.index.xml.gz.E5wKN9" failed: Permission denied (13)

sent 102,671 bytes  received 127 bytes  68,532.00 bytes/sec
total size is 102,449  speedup is 1.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1249) [sender=3.1.2]