This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rsync problems from Vista installed cygwin, ok on XP



Igor Peshansky wrote:
> 
> 
>> DaveB wrote....[snip]
>> Local permissions...  haven't used getfacl before but tried it in cygwin
>> and got this...
>>
>> ================================
>> daveb@daveb9400 /cygdrive/c/4up
>> $ getfacl *
>> # file: 20070709 mach refresh issue
>> # owner: daveb
>> # group: None
>> user::---
>> group::---
>> group:SYSTEM:rwx
>> group:Administrators:rwx
>> group:Users:r-x
>> mask:rwx
>> other:---
>> default:group:SYSTEM:rwx
>> default:group:Administrators:rwx
>> default:group:Users:r-x
>> default:mask:rwx
>>
>> # file: somejunk.txt
>> # owner: daveb
>> # group: None
>> user::---
>> group::---
>> group:SYSTEM:rwx
>> group:Administrators:rwx
>> group:Users:r-x
>> mask:rwx
>> other:---
>>
>> =========================
>>
>> Vista account is only one on machine, has admin privileges.
>> UAC is switched on.
>> I did have cygwin, hence rsync running normally in this test, but now
>> that
>> you remind me, I also tried it before using "Run As Administrator" on
>> cygwin. Made no difference.
>> ...[snip]
> 
> Ok, here's a WAG.  Your problem stems from the fact that the Unix
> permissions on that directory really are 0.  All of the access information
> is stored in separate ACLs, which rsync does not copy.  Thus, it sets the
> permissions on the remote copy to 0, and, obviously, is unable to write to
> that directory afterwards.
> 
> You can run "chmod -R 775" on that directory, which should, if my WAG
> above is correct, fix your rsync problem.
> 	Igor
> P.S. Before you ask, I'm not aware of any way to make rsync copy the ACLs.
> 

Hey that did it!!! Thanks!!!  In cygwin I did an ls -laR and confirmed the
directory had d------ privileges. The first attempt to chmod -R 775 failed,
then I restarted cygwin with "Run As Administrator" and it worked.  The
first attempt to rsync then failed because the folder up there on the Linux
machine was still set to d------ from the last attempt... so I went in and
chmod'd that to 755 (not 775, deliberately different)... then tried the
rsync again... hummed along no problems, then after completion I went back
to the Linux machine and the test files were all there and the privileges
for the folder had been changed from 755 to 775 (drwxrwxr-x)... perfect.

So... two interesting followon points...

1. Why didn't the ACLs get set to something reasonable as opposed to 000 in
the first place when I created this little test area in Vista?  After all, I
could do directory listings even in cygwin, so it seems a bit of an unfair
trick on me that the access was actually set to 000...  In fact, thinking
about it, I guess it inherited the 000 from the parent c:\ directory.  But
just seems a bit odd to me that I ended up with this 000 setting which in
unix systems means one cannot even do an ls yet I was totally unaware of it
and able to see all the files

2. Given the above, and Igor's comments that rsync will not copy ACLs, why
in the world did rsync copy the strange 000 flags... hmmm... not sure about
this, in a way it is 100% correct to do that, but maybe there should be
(maybe there already is??) a flag on rsync which stops it setting
permissions during the transfers.

Having made these observations, I must say that in my case the problem is
now 100% solved by Igor's suggestion... I will simply do that chmod 775 -R
to all my file trees I intend to sync in future.  But this sure is a trap
for the innocent...  thanks again Igor
-- 
View this message in context: http://www.nabble.com/rsync-problems-from-Vista-installed-cygwin%2C-ok-on-XP-tf4260918.html#a12219269
Sent from the Cygwin Users mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]