Announcement

Collapse
No announcement yet.

14128 FTP "Preserve timestamps on upload" fail

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 14128 FTP "Preserve timestamps on upload" fail

    If a local to (Fastmail.FM server) FTP sync operation is cancelled, "Preserve timestamps on upload" can fail to take effect, leaving a wrongly timestamped (part) file e.g. http://img811.imageshack.us/img811/4627/regionk.png - log of subsequent similar instance below.

    Very unpleasant because it causes that file to be skipped in the next sync, leaving the fileset corrupt indefinitely.

    Note: Simultaneous connections is 1.

    Code:
    2012-01-11 22:46:54  Username: OWNER-ZBB5FTV33\Chris
    2012-01-11 22:46:54  Stat> Connected.
    2012-01-11 22:46:54  Recv> 220 frontend1 FTP server (Net::FTPServer/1.122-1 ME::VFS::Interface::FTP/22691) ready.
    2012-01-11 22:46:54  Sent> HOST ftp.messagingengine.com
    2012-01-11 22:46:54  Recv> 200 HOST set to ftp.messagingengine.com.
    2012-01-11 22:46:54  Sent> USER chrisjj@fastmail.fm
    2012-01-11 22:46:54  Recv> 331 Username OK, please send password.
    2012-01-11 22:46:54  Sent> PASS ********
    2012-01-11 22:46:55  Recv> 230 Welcome chrisjj@fastmail.fm.
    2012-01-11 22:46:55  Sent> FEAT
    2012-01-11 22:46:55  Recv> 211-Extensions supported:
    2012-01-11 22:46:55  Recv>  AUTH TLS
    2012-01-11 22:46:55         CCC
    2012-01-11 22:46:55         HASH SHA-1*
    2012-01-11 22:46:55         HOST
    2012-01-11 22:46:55         LANG EN*
    2012-01-11 22:46:55         MDTM
    2012-01-11 22:46:55         MFMT
    2012-01-11 22:46:55         MLST TYPE*;SIZE*;MODIFY*;PERM*;UNIX.MODE*;
    2012-01-11 22:46:55         PBSZ
    2012-01-11 22:46:55         PROT
    2012-01-11 22:46:55         REST STREAM
    2012-01-11 22:46:55         SIZE
    2012-01-11 22:46:55         TVFS
    2012-01-11 22:46:55         UTF8
    2012-01-11 22:46:55         UTIME
    2012-01-11 22:46:55        211 END
    2012-01-11 22:46:55  Sent> TYPE I
    2012-01-11 22:46:55  Recv> 200 TYPE changed to I.
    2012-01-11 22:46:55  Sent> SYST
    2012-01-11 22:46:55  Recv> 215 UNIX Type: L8
    2012-01-11 22:46:55  Sent> OPTS UTF8 ON
    2012-01-11 22:46:55  Recv> 501 Command has no settable options.
    2012-01-11 22:46:55  Sent> PWD
    2012-01-11 22:46:55  Recv> 257 "/"
    2012-01-11 22:46:55  Sent> REST 1
    2012-01-11 22:46:56  Recv> 350 Restarting next transfer at 1.
    2012-01-11 22:46:56  Sent> REST 0
    2012-01-11 22:46:56  Recv> 350 Restarting next transfer at 0.
    2012-01-11 22:46:56  Sent> CWD chrisjj.fastmail.fm/files/chrisjj.com/tango/clips
    2012-01-11 22:46:56  Recv> 250 Changed directory OK.
    2012-01-11 22:46:56  Sent> PWD
    2012-01-11 22:46:56  Recv> 257 "/chrisjj.fastmail.fm/files/chrisjj.com/tango/clips"
    2012-01-11 22:46:56  Sent> PASV
    2012-01-11 22:46:56  Recv> 227 Entering Passive Mode (66,111,4,57,246,149)
    2012-01-11 22:46:56  Sent> MLSD
    2012-01-11 22:46:56  Recv> 150 Opening data connection for file listing.
    2012-01-11 22:46:57  Recv> 226 Listing complete. Data connection has been closed.
    2012-01-11 22:46:57  Load comparison: D:\Projects\ChrisJJ\chrisjj.com web\www.chrisjj.com\tango\clips <-> ftp://chrisjj@fastmail.fm@ftp.messagingengine.com/chrisjj.fastmail.fm/files/chrisjj.com/tango/clips
    2012-01-11 22:47:06  Sent> PASV
    2012-01-11 22:47:06  Recv> 227 Entering Passive Mode (66,111,4,57,197,175)
    2012-01-11 22:47:06  Sent> STOR 00008637207120-1-2.mp3
    2012-01-11 22:47:06  Recv> 150 Opening BINARY mode data connection for file 00008637207120-1-2.mp3.
    2012-01-11 22:47:18  Recv> 226 File store complete. Data connection has been closed.
    2012-01-11 22:47:18  Sent> MFMT 20100827133900 00008637207120-1-2.mp3
    2012-01-11 22:47:18  Recv> 213 Modify=20100827133900; 00008637207120-1-2.mp3
    2012-01-11 22:47:18  Sent> PASV
    2012-01-11 22:47:18  Recv> 227 Entering Passive Mode (66,111,4,57,235,187)
    2012-01-11 22:47:18  Sent> STOR 00008637207120-1-4.mp3
    2012-01-11 22:47:18  Recv> 150 Opening BINARY mode data connection for file 00008637207120-1-4.mp3.
    2012-01-11 22:47:20  Sent> ABOR
    2012-01-11 22:47:29  Recv> 226 File store complete. Data connection has been closed.
    2012-01-11 22:47:29  Stat> Connected.
    2012-01-11 22:47:29  Recv> 220 frontend1 FTP server (Net::FTPServer/1.122-1 ME::VFS::Interface::FTP/22691) ready.
    2012-01-11 22:47:29  Sent> USER chrisjj@fastmail.fm
    2012-01-11 22:47:29  Recv> 331 Username OK, please send password.
    2012-01-11 22:47:29  Sent> PASS ********
    2012-01-11 22:47:30  Recv> 230 Welcome chrisjj@fastmail.fm.
    2012-01-11 22:47:30  Sent> FEAT
    2012-01-11 22:47:30  Recv> 211-Extensions supported:
    2012-01-11 22:47:30  Recv>  AUTH TLS
    2012-01-11 22:47:30         CCC
    2012-01-11 22:47:30         HASH SHA-1*
    2012-01-11 22:47:30         HOST
    2012-01-11 22:47:30         LANG EN*
    2012-01-11 22:47:30         MDTM
    2012-01-11 22:47:30         MFMT
    2012-01-11 22:47:30         MLST TYPE*;SIZE*;MODIFY*;PERM*;UNIX.MODE*;
    2012-01-11 22:47:30         PBSZ
    2012-01-11 22:47:30         PROT
    2012-01-11 22:47:30         REST STREAM
    2012-01-11 22:47:30         SIZE
    2012-01-11 22:47:30         TVFS
    2012-01-11 22:47:30         UTF8
    2012-01-11 22:47:30         UTIME
    2012-01-11 22:47:30        211 END
    2012-01-11 22:47:30  Sent> TYPE I
    2012-01-11 22:47:30  Recv> 200 TYPE changed to I.
    2012-01-11 22:47:30  Sent> SYST
    2012-01-11 22:47:30  Recv> 215 UNIX Type: L8
    2012-01-11 22:47:30  Sent> OPTS UTF8 ON
    2012-01-11 22:47:30  Recv> 501 Command has no settable options.
    2012-01-11 22:47:30  Sent> PWD
    2012-01-11 22:47:30  Recv> 257 "/"
    2012-01-11 22:47:30  Sent> CWD /chrisjj.fastmail.fm/files/chrisjj.com/tango/clips
    2012-01-11 22:47:31  Recv> 250 Changed directory OK.
    2012-01-11 22:47:31  Sent> PASV
    2012-01-11 22:47:31  Recv> 227 Entering Passive Mode (66,111,4,57,224,111)
    2012-01-11 22:47:31  Sent> MLSD
    2012-01-11 22:47:31  Recv> 150 Opening data connection for file listing.
    2012-01-11 22:47:31  Recv> 226 Listing complete. Data connection has been closed.
    2012-01-11 22:47:31  Successfully synchronized 1 items.  Failed to synchronize 2 items.  Cancelled by user.  Completed in 24.8 seconds.
    Last edited by chrisjj; 11-Jan-2012, 04:47 PM.

  • #2
    It really isn't appropriate to set the timestamps in this case. The file hasn't been fully uploaded and you've specifically said to cancel the copy, so we do so. Setting the timestamp wouldn't help, because it would have the right date and the wrong contents.

    Ideally the server would handle interrupted transfers gracefully by only replacing the target file once the transfer has finished successfully, but that's a server-side decision that we don't have control over. I'd expect most servers don't do that, especially Unix ones, since the "Unix way" is to just overwrite a file immediately.

    It's unfortunate, and I certainly understand your concerns, but it's just a side effect of how poorly FTP was specified back in the day. If you want solid, consistent behavior, you need to use Windows SMB shares.
    ZoŽ P Scooter Software

    Comment


    • #3
      Originally posted by Craig View Post
      The file hasn't been fully uploaded and you've specifically said to cancel the copy, so we do so.
      You merely abort the copy. I had hoped you'd not leave corrupt copies.

      Originally posted by Craig View Post
      Ideally the server would handle interrupted transfers gracefully...
      Ideally the client would.

      Originally posted by Craig View Post
      It's unfortunate, and I certainly understand your concerns, but it's just a side effect of how poorly FTP was specified back in the day.
      I honestly cannot see what BC leaving corrupt files has got to do with the FTP specification. BC is making apparently no attempt to clean up.

      Comment


      • #4
        BC can't do anything to clean up. The first several releases of BC2 deleted the target file if it wasn't uploaded successfully and that caused problems for other people. Setting timestamps isn't appropriate because we didn't successfully transfer everything. What, exactly, are you proposing we do?
        ZoŽ P Scooter Software

        Comment


        • #5
          > BC can't do anything to clean up. The first several releases of BC2 deleted
          > the target file if it wasn't uploaded successfully and that caused problems for other people.

          Well, the removal of that behaviour in BC3 causes a problem for this person. Why not make it an option? Joining the many important existing options that already cause problems for others, e.g. passive mode, simultaneous connections.

          EDIT Re:

          > BC can't do anything to clean up.

          I see "Finalising" on the operations bar.
          Last edited by chrisjj; 17-Jan-2012, 07:16 PM.

          Comment

          Working...
          X