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


On Fri, 17 Aug 2007, DaveB wrote:

> Corinna Vinschen-2 wrote:
> >
> > For testing I copied over the whole /usr directory from my Vista box
> > to a Linux machine.  I'm rather puzzled how setting permissions on the
> > *remote* machine should be affected by the OS of the source machine.
> >
> > I guess we need much more information.  Are the affected directories
> > Cygwin-created directories or natively created dirs?  Do they contain
> > spaces or native characters?  What are the local permissions on them
> > (getfacl/cacls)?  Does your Vista account have admin privileges?  UAC
> > switched on?  If so, is rsync running normally with reduced privileges
> > or "as administrator"?  Is your remote Unix account root or non-root?
> >
> > Corinna
>
> OK, encouraged by hearing that it works for you from Vista to a Linux
> machine, I have retraced my steps and tried a much simpler contrived
> example.  I set up a little folder tree c:\4up with a single file called
> somejunk.txt and one subfolder with two files, a txt and a jpg, latter
> with spaces but certainly no special characters.  That's on the Vista
> pc.  Then I putty'd across to my ftp area on a Linux server and created
> a new subfolder there called .../4up to copy these files to via rsync.
> ls shows total 0 in putty.
> Then back on Vista pc in cygwin I cd'd to the 4up folder and typed in
> this dry run rsync command....
>
> $ rsync -avzn --stats --progress -e ssh . xxxx@myhost.net:/home/xxx/yyy/4up
>
> It happily responded, listing the 2 directories and 3 files and no
> errors. I then repeated the command without the dry run -n flag... ie
> set it live. It came up with all the errors as before...
>
> ==========================================================
> $ rsync -avz --stats --progress -e ssh . xxxx@myhost.net:/home/xxx/yyy/4up
>
> xxxx@myhost.net's password:
> building file list ...
> 5 files to consider
> ./
> rsync: failed to modify permissions on "/home/xxx/yyy/4up/.": Permission
> denied (13)
> rsync: recv_generator: failed to stat "/home/xxx/yyy/4up/somejunk.txt":
> Permission denied (13)
> 20070709 mach refresh issue/
> rsync: recv_generator: mkdir "/home/xxx/yyy/4up/20070709 mach refresh issue"
> failed: Permission denied (13)
> *** Skipping everything below this failed directory ***
> rsync: failed to modify permissions on "/home/xxx/yyy/4up/20070709 mach
> refresh issue": Permission denied (13)
> rsync: recv_generator: mkdir "/home/xxx/yyy/4up/." failed: Permission denied
> (13)
> *** Skipping everything below this failed directory ***
>
> etc...
> ===========================
>
> and after doing this failed rsync, I went back to the putty window to
> look at the remote machine and typed ls again... and bingo... permission
> denied. cd .. and ls -l shows the directory 4up with permission now set
> to 0:
> d---------   2 xxxx xxxxx   48 Aug 17 07:42 4up/
>
> ===========================
>
> Let me answer the rest of the questions if I can.
> The affected directories are not cygwin created, now or before.  They
> are natively created.
> They do not contain special chars, nor does the full path to the first
> file even contain a space c:\4up\somjunk.txt but the subfolder and the
> two files in it contain spaces.
> 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.
> Remote unix account is non root... I am using a service provider's Linux
> box, don't know much about the machine, but I have 200GB of file space
> available up there somewhere in the US.
> I can putty to it and type in some commands to report info back if there
> is something specific to find out. Also can talk to their tech support
> 24/7.

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.
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Belief can be manipulated.  Only knowledge is dangerous.  -- Frank Herbert

--
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]