• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Really odd FTP issue

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

    #11
    Originally posted by WTFH View Post

    No, nothing special around row 50 - we've tried with other file sizes and it is just overwriting the new data as far as it needs to in the file.
    It sounds like the destination file is being opened for writing, but never closed. That would leave it hanging and presumably the OS would eventually close the open file handle but without any awareness of what had been done to it. This could, in theory, leave the content on disk having been overwritten but the file descriptor not having been told the new length of the file. Then the file would have the new content at the start but have the same length as the old file from the point of view of whatever reads it.

    Originally posted by WTFH View Post
    The people that the data is going to have now discovered that the new file has its original header and the new header as well.
    This also makes it sound like the file modification is happening but being left hanging. But by this point, I'd be demanding hex dumps of individual disk sectors so I could see what was really going on

    Originally posted by WTFH View Post
    I wonder if we can send a Delete before we send the next file, or maybe move/rename the previous file when we send the new one.
    That might work but if it's what I suggest, then fixing the sending FTP client to properly close the file (or the receiving one to do so if it's their fault) would resolve the issue by making things work properly, which is better than a clumsy and haphazard "fix" that seems to work and does… for now

    Comment


      #12
      Originally posted by NickFitz View Post

      It sounds like the destination file is being opened for writing, but never closed. That would leave it hanging and presumably the OS would eventually close the open file handle but without any awareness of what had been done to it. This could, in theory, leave the content on disk having been overwritten but the file descriptor not having been told the new length of the file. Then the file would have the new content at the start but have the same length as the old file from the point of view of whatever reads it.
      I've never seen UNIX doing anything like this but I guess you never know.

      As an experiment, I would try the same FTP transfers (small text file overwriting large text file) from the UNIX server to itself (ie. using the UNIX FTP client). This would take the Windows side of things out of the equation altogether.
      Last edited by woody1; 13 July 2024, 08:03.

      Comment

      Working...
      X