ftp - When is it safe to assume file uploads are successful?

07
2013-09
  • Camilo Martin

    When I upload files to a server through HTTP or FTP, I normally download them again just to check that they were successfully uploaded (I use md5 checksums to check that).

    Is this necessary? Can I be sure that file uploads through HTTP or FTP are successful, if the software used to upload them (for example the browser when using SkyDrive or similar services, or FTPZilla when using FTP, etc) did not give me any errors?

    Oh, and I know about rsync, no need to suggest it. This is for cases where rsync is not an option.

  • Answers
  • deed02392

    Success in terms of whether or not the packets of data actually arrived there as it was sent is usually determined by the underlying protocol, in this case TCP. Often this is plenty to assume success as most file transfer protocols use this to determine if any data corruption occurred at the network level.

    I assume you mean the entire file though, in which case yes, checksumming is the best way to verify uploaded data.

    However there is no reason you need to download them again to verify them, you can perform the checksumming on the server itself. Specifically with FTP there are solutions which perform checksumming of files as part of the upload process itself, for example drftpd with the zipscript plugin uses .sfv files to check uploaded files on a directory level.


  • Related Question

    ftp - On demand upload server
  • stimms

    I'm looking for a simple application which will do something like

    Allow user to sign up for an ftp account -> ask admin for approval -> create ftp account for that user
    

    now it doesn't have to be FTP, in fact I would be happy with a web based tool which supported upload via some sort of java applet or something similar. I don't care about what platform it runs on, although if we could avoid PHP that would be cool. Any ideas?


  • Related Answers
  • William Hilsum

    What platform? Without this, I am just giving some general advice.

    This is easy to achieve and I have just made something similar for my company but it depends on a number of things and will usually require a bit of scripting.

    The easiest way is to find a FTP server that supports a database for user membership, then all you need to do is create a small website in the language of your choice and simply take username and password along with anything else you want. You can then set that script to send you a email with all the details or simply have it display on another (admin) webpage, and a delete or confirm button.

    When you press delete, it deletes the entry (of course!) and when you click confirm, it can enter the details in to the database of the FTP server.

    You can also use a FTP server that has membership in any form (such as XML files or windows / unix accounts) but having one that has a database backend is so much simpler.

    Also, You could have all users in one database, if they are confirmed or not, but I said the above just for simplicity as you probably do not want thousands of unconfirmed / disabled ftp users.

  • alpha1

    if its openBSD you might look at hosting a file FTP site using Freenas. Freenas can be used as a webserver now, so you could do it.