Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm rsyncing content from my Windows XP box to an OS X Lion box, and some of the folders have the wrong permission.

> rsync -rtvz --del "/cygdrive/c/rsync_20101220/" "agrimm@[redacted]:'/Users/agrimm/external/daiichi/Top level files/rsync_20101220'"
[lot of listing of files skipped. More logging than buffer, so I don't know if any logging messages were lost]
sent 2439672264 bytes  received 1444272 bytes  795800.01 bytes/sec
total size is 22869261932  speedup is 9.37
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1042) [sender=3.0.7]

On the OS X box, this is what I get permission-wise:

~ agrimm$ cd external/daiichi/
daiichi agrimm$ ls -ltra
total 0
drwxr-xr-x   6 agrimm  staff  204 Aug 24  2011 Thunderbird
drwxr-xr-x   6 agrimm  staff  204 Jul  4 09:21 FinePrint files
drwxr-xr-x   4 agrimm  staff  136 Jul 10 13:10 ..
drwxr-xr-x  17 agrimm  staff  578 Jul 11 10:50 Desktop
drwxr-xr-x   6 agrimm  staff  204 Jul 11 11:22 .
drwxr-xr-x   3 agrimm  staff  102 Jul 11 11:25 Top level files
daiichi agrimm$ cd Top\ level\ files/
Top level files agrimm$ ls -ltra
total 0
drwxr-xr-x  5 agrimm  staff  170 Aug 18  2011 rsync_20101220
drwxr-xr-x  6 agrimm  staff  204 Jul 11 11:22 ..
drwxr-xr-x  3 agrimm  staff  102 Jul 11 11:25 .
Top level files agrimm$ cd rsync_20101220/
rsync_20101220 agrimm$ ls -ltra
total 0
d-wx------   4 agrimm  staff  136 Dec  4  2009 Desktop
d-wx------  13 agrimm  staff  442 Apr  5  2011 gitrepos
drwxr-xr-x   5 agrimm  staff  170 Aug 18  2011 .
drwx------   7 agrimm  staff  238 Aug 18  2011 code
drwxr-xr-x   3 agrimm  staff  102 Jul 11 11:25 ..
rsync_20101220 agrimm$ ls Desktop/
ls: : Permission denied
rsync_20101220 agrimm$ ls gitrepos/
ls: : Permission denied
rsync_20101220 agrimm$ ls -ltr code/
total 0
d-wx------   3 agrimm  staff  102 Jan 20  2010 temporary_development
d-wx------   3 agrimm  staff  102 Dec  2  2010 merging
d-wx------   3 agrimm  staff  102 Dec 21  2010 inactive
d-wx------   5 agrimm  staff  170 Jul  4  2011 sandbox
d-wx------  19 agrimm  staff  646 Aug 24  2011 hiv_recombination
rsync_20101220 agrimm$ ls -R code/
hiv_recombination       inactive                merging                 sandbox                 temporary_development

code//hiv_recombination:
ls: hiv_recombination: Permission denied

code//inactive:
ls: inactive: Permission denied

code//merging:
ls: merging: Permission denied

code//sandbox:
ls: sandbox: Permission denied

code//temporary_development:
ls: temporary_development: Permission denied
rsync_20101220 agrimm$

The permissions and users of the files look consistent on the Windows box. From within git bash:

A.Grimm@AGRIMM-MED /c/rsync_20101220
$ ls -ltra
total 0
drwxr-xr-x    2 A.Grimm  Administ        0 Dec  4  2009 Desktop
drwxr-xr-x   13 A.Grimm  Administ        0 Apr  5  2011 gitrepos
drwxr-xr-x    5 A.Grimm  Administ        0 Aug 18  2011 .
drwxr-xr-x    7 A.Grimm  Administ        0 Aug 18  2011 code
drwxr-xr-x   26 A.Grimm  Administ        0 Jul 11 12:55 ..

Why would the permissions be wrong in some circumstances, but not in others? Should I just delete "rsync_20101220" on the OS X box and do it again with -p added to the rsync command?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

I didn't find using -p fixed things. Instead, I manually created empty versions of the problem directories, and then rsynced.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.