Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

rsync status in 10.4.7



rsync status in OS X Tiger 10.4.7
=================================

The below are the findings listed for rsync. I'd imagine similar findings for tar and other tools that rely on copyfile() to properly (or in this case, improperly) operate.

Findings
--------

- preserves ACLs on files w/o Extended Attributes, yet mangles the ACL's private EA values

- crashes copying files with both ACLs and Extended Attributes

- fails to copy Extended Attributes, generates warning

- fails to maintain creation dates, munges with modification date

- fails to maintain BSD (chflag) flags

- symlink ownerships are preserved


Advice ------

rsync should be avoided for copying files unless you can live with the above limitations


Evidence --------

#create some files dshoop@ooblek:/Volumes/OoblekData/dshoop
1 % ssh root@yertle
Last login: Sun Apr 9 13:41:15 2006 from 192.168.1.1
Welcome to Darwin!
yertle:~ root# uname -v
Darwin Kernel Version 8.7.0: Fri May 26 15:20:53 PDT 2006; root:xnu-792.6.76.obj~1/RELEASE_PPC
yertle:~ root# touch file
yertle:~ root# touch filexattr
yertle:~ root# touch fileacl
yertle:~ root# touch fileboth
yertle:~ root# touch filebsdflag
yertle:~ root# /usr/local/bin/xattr --set color blue filexattr
yertle:~ root# /usr/local/bin/xattr --set color blue fileboth
yertle:~ root# chmod +a "admin allow read" fileacl
yertle:~ root# chmod +a "admin allow read" fileboth
yertle:~ root# chflags arch filebsdflag




# ACL test
yertle:~ root# rsync -avE fileacl fileacl2
building file list ... done
fileacl
._fileacl

sent 374 bytes  received 60 bytes  868.00 bytes/sec
total size is 0  speedup is 0.00
yertle:~ root# ls -alse fileacl*
0 -rw-r--r-- + 1 root  wheel  0 Jun 29 17:59 fileacl
 0: group:admin allow read
0 -r-------- + 1 root  wheel  0 Jun 29 17:59 fileacl2
 0: group:admin allow read
# ACL is, however, mangled as an EA
yertle:~ root# /usr/local/bin/xattr --list fileacl
fileacl
yertle:~ root# /usr/local/bin/xattr --list fileacl2
fileacl2
        com.apple.acl.text      !#acl 1
group:ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000050:admin:80:allow:read



# Extended Attribute test
yertle:~ root# rsync -avE filexattr filexattr2
building file list ... done
filexattr
file has vanished: "/private/var/root/._filexattr"

sent 111 bytes received 60 bytes 342.00 bytes/sec
total size is 0 speedup is 0.00
rsync warning: some files vanished before they could be transferred (code 24) at /SourceCache/rsync/rsync-24/rsync/main.c(717)
yertle:~ root# xattr --list filexattr*
-sh: xattr: command not found
yertle:~ root# /usr/local/bin/xattr --list filexattr*
filexattr
color blue
filexattr2




# ACL + EA test
# this also generates a crash and crash dump if CrashReporter is enabled!!
yertle:~ root# rsync -avE fileboth fileboth2
building file list ... done
fileboth
._fileboth
rsync: connection unexpectedly closed (61 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-24/rsync/io.c(359)
rsync: connection unexpectedly closed (52 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-24/rsync/io.c(359)




# creation date test
yertle:~ root# touch file
yertle:~ root# /Developer/Tools/GetFileInfo file
file: "/private/var/root/file"
type: ""
creator: ""
attributes: avbstclinmedz
created: 06/29/2006 18:03:42
modified: 06/29/2006 18:10:03
yertle:~ root# rsync -avE file file2
building file list ... done
file

sent 84 bytes  received 40 bytes  248.00 bytes/sec
total size is 0  speedup is 0.00
yertle:~ root# /Developer/Tools/GetFileInfo file2
file: "/private/var/root/file2"
type: ""
creator: ""
attributes: avbstclinmedz
created: 06/29/2006 18:10:03
modified: 06/29/2006 18:10:03



# BSD flag test
yertle:~ root# ls -also filebsdflag
0 -rw-r--r--   1 root  wheel  arch 0 Jun 29 18:00 filebsdflag
yertle:~ root# rsync -avE filebsdflag filebsdflag2
building file list ... done
filebsdflag

sent 91 bytes  received 40 bytes  262.00 bytes/sec
total size is 0  speedup is 0.00
yertle:~ root# ls -also filebsdflag2
0 -rw-r--r--   1 root  wheel  - 0 Jun 29 18:00 filebsdflag2



# symlink ownership test
yertle:~ root# su -l dshoop
yertle:~ dshoop$ cd /
yertle:/ dshoop$ touch file
yertle:/ dshoop$ ln -s file filesymlink
yertle:/ dshoop$ ls -als file
0 -rw-r--r--   1 dshoop  admin  0 Jun 29 18:18 file
yertle:/ dshoop$ ls -als filesymlink
8 lrwxr-xr-x   1 dshoop  admin  4 Jun 29 18:19 filesymlink -> file
yertle:/ dshoop$ exit
logout
yertle:~ root# cd /
yertle:/ root# rsync -avE filesymlink filesymlink2
building file list ... done
filesymlink2 -> file

sent 88 bytes  received 20 bytes  72.00 bytes/sec
total size is 4  speedup is 0.04
yertle:/ root# ls -als filesymlink
8 lrwxr-xr-x   1 dshoop  admin  4 Jun 29 18:19 filesymlink -> file
yertle:/ root# ls -als filesymlink2
8 lrwxrwxrwx   1 dshoop  admin  4 Jun 29 18:20 filesymlink2 -> file
--

-dhan

------------------------------------------------------------------------
Dan Shoop                                                   AIM: iWiring
Systems & Networks Architect                      http://www.ustsvs.com/
email@hidden                                http://www.iwiring.net/
1-714-363-1174

pgp key fingerprint: FAC0 9434 B5A5 24A8 D0AF  12B1 7840 3BE7 3736 DE0B

iWiring provides systems and networks support for Mac OS X, unix, and
Open Source application technologies at affordable rates.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macos-x-server/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.