Rsync fails to rename on Windoze2003

Tony Abernethy tony at servacorp.com
Sun Jun 25 18:08:00 GMT 2006


The place for confusion is on the target.  Nothing is renamed on the source.
If the target has more than one file matching RICHED*.cab, however it got
there, expect trouble.

For whatever reason,
the temp file .RICHED~1.cab.XXXXX was renamed to RICHED~1.cab (on the
target),
is exactly where you are running into trouble.
Why is pretty much a guessing game, but is almost certainly outside of any
version of rsync.
What would easily explain the symptoms is if you have a file
RICHEDIT-THI-STUFF.cab or some such
and that file is open or something decides that that file should not be
clobbered.

Out of curiosity, why would you have a file named RICHED~1.cab?
That looks like the DOS 8.3 alias for a long file name

It is possible that the first time creates a new RICHED~1.cab -- this goes
successfully
It is possible that any later RICHED~1.cab file is the WRONG RICHED~1.cab
file
    (Windows (possibly Cygwin) idea of wrong)
(Renaming long files based on Russian Roulette with the DOS 8.3 filenames
has to be chancy at best)

  -----Original Message-----
  From: rsync-bounces+tony=servacorp.com at lists.samba.org
[mailto:rsync-bounces+tony=servacorp.com at lists.samba.org]On Behalf Of Corey
Wirun - personal
  Sent: Sunday, June 25, 2006 12:40 PM
  To: rsync at lists.samba.org
  Subject: Re: Rsync fails to rename on Windoze2003


  Hi Tony,

  I understood.   I thought you were referring to possible confusion between
two files on the source - like RICHED~2.cab and RICHED~1.cab getting copied
to the target and the 'wrong' file being renamed.  In this case, there's
only one file on the source getting copied to the target.

  You would think that if the temp file .RICHED~1.cab.XXXXX was renamed to
RICHED~1.cab (on the target), that shouldn't cause a problem.  Unless, as
you say, it's not yet closed when the rename occurs.  In that case, this
appears to be a problem with rsync, is it not?  Especially considering how
different 2.6.8 works compared to 2.6.6 (which works 'better').

  In any case, I'm going to checksum the source and target.  It does appear
that the sync did do something, and that the errors might be noise.

  Thanks for the reply.
  Corey.
    ----- Original Message -----
    From: Tony Abernethy
    To: Corey Wirun - personal ; rsync at lists.samba.org
    Sent: Sunday, 25 June, 2006 10:17
    Subject: RE: Rsync fails to rename on Windoze2003


    TARGET
    The rename is on the target side, not the source.
    If the file is OPEN on the target side, Windows will not let you rename
or otherwise mess with it.
      -----Original Message-----
      From: rsync-bounces+tony=servacorp.com at lists.samba.org
[mailto:rsync-bounces+tony=servacorp.com at lists.samba.org]On Behalf Of Corey
Wirun - personal
      Sent: Sunday, June 25, 2006 10:16 AM
      To: rsync at lists.samba.org
      Subject: Re: Rsync fails to rename on Windoze2003


      Thanks Tony,

      The source only has one file:  RICHED~1.cab, so my guess is that the
short name business isn't what is biting me here.

      Corey.
        ----- Original Message -----
        From: Tony Abernethy
        To: Corey Wirun - Lists ; rsync at lists.samba.org
        Sent: Sunday, 25 June, 2006 07:31
        Subject: RE: Rsync fails to rename on Windoze2003


        This is mostly wild guesses (with luck you get some more
knowledgeable answers)
        From what I have observed ...
        file of the form .RICHED~1.cab.IEKJmo  is an rsync temporary of file
RICHED~1.CAB
        Trying to rename the temporary file to its permanent name, it ran
into trouble on the name RICHED~1.cab
        The idea is to NOT destroy the older target if the transfer goes
south.

        Do a DIR cdrom/riched32/RICHED*.cab   and see if it turns up
anything.
        If you have more than one of them, Windows probably gets it wrong as
to which
        is RICHED~1.cab and which is RICHED~2.cab
        Windows does have a kinda-sorta soft-link with the DOS 8.3 naming.
        Anything complicated in the naming and Windows manages to get it
wrong at least half the time.
          -----Original Message-----
          From: rsync-bounces+tony=servacorp.com at lists.samba.org
[mailto:rsync-bounces+tony=servacorp.com at lists.samba.org]On Behalf Of Corey
Wirun - Lists
          Sent: Saturday, June 24, 2006 11:05 PM
          To: rsync at lists.samba.org
          Subject: Re: Rsync fails to rename on Windoze2003


          Some further information:

          I went back to 2.6.6 of rsync on the client and server and at
least the entire sync completes.  I still get the 'Permission Denied'
problem on the rename though.   I had a look at the logs and it appears the
rename error is _always_ on a file name with a '.' as the starting
character.  e.g.

          ...
          rsync: rename
"MEDIA_2006_LATEST/cdrom/riched32/.RICHED~1.cab.lEKJmo" (in MEDIA_2006) ->
"cdrom/riched32/RICHED~1.cab": Permission denied (13)
          ...
          total: matches=278531  tag_hits=1689129  false_alarms=123
data=79645872

          sent 80988322 bytes  received 2116535 bytes  72233.69 bytes/sec
          total size is 1470681718  speedup is 17.70
          rsync error: some files could not be transferred (code 23) at
/home/lapo/packaging/tmp/rsync-2.6.6/main.c(791)

          My source tree has no files with a '.' at the beginning.  There
was a file 'RICHED~1.cab' in the source - don't know why rsync thinks there
should be a '.' in front of it on the destination.

          So it appears that file permissions to not have a bearing on the
problem, but something in rsync is looking for files with a '.' at the
beginning.  But why does this only occur at random, not for every file?
Note the 'false alarms' above - does that mean anything?

          Does anyone have any further notion why I get these rename errors?

          Thanks in Advance!
          Corey.

          ----- Original Message -----
            From: Corey Wirun - Lists
            To: rsync at lists.samba.org
            Sent: Saturday, 24 June, 2006 14:22
            Subject: Rsync fails to rename on Windoze2003


            Hi All,

            I've seen several variations on this topic, but nothing exactly
the same:

            I have two Windows 2003 servers that I want to use rsync (2.6.8)
to mirror.  These machines are separated by a WAN.

            Initial attempts to get rsync working between them have not been
successful.  The first rsync went fine, which seeded the files, but the
second sync always fails (at a ramdom time) with a

            rsync: rename "AP16A7~1.cab.V55PQE" (in MEDIA_2006) ->
"AP16A7~1.cab": Permission denied (13)

            On the server, the rsyncd (from cwRsyncd), I initially ran the
service as user SvcwRsync (from the installer), then added the user to the
Administrators group, then changed the server to run as Administrator, all
to no avail.

            If it was a perms problem, I wouldn't get _any_ files updated,
but this fails on the rename at a random time.

            So I changed the rsync client to --inplace and I see (again
random):

            unexpected tag 3 [sender]
            rsync error: error in rsync protocol data stream (code 12) at
io.c(828) [sender=2.6.8]

            I really would prefer to not have to use --inplace to optimize
the bandwidth taken up.

            Any thoughts on why the rename fails?  I would have thought the
owner of the service as local Administrator would be fine!

            Thanks in Advance!
            Corey.


--------------------------------------------------------------------


            --
            To unsubscribe or change options:
https://lists.samba.org/mailman/listinfo/rsync
            Before posting, read:
http://www.catb.org/~esr/faqs/smart-questions.html


----------------------------------------------------------------------------


    --
    To unsubscribe or change options:
https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the rsync mailing list