Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have some automated scripts which perform FTP uploads among other things. I'm wondering what level of error checking I should conduct once these uploads have finished executing.

Could anything go wrong uploading a file when it reports "226 Transfer complete" which would warrant extra tests, besides checking for this string in the log, to check if a file was successfully uploaded?

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

No, it does not. 226 can also occur on various conditions where this would not be true (ABORT for one). See RFC 959.

share|improve this answer
    
Presumably the OP knows he isn't issuing an ABORT command, which to my knowledge, no servers support and no clients issue anyhow. –  psusi Mar 28 '12 at 18:13
    
@psusi - ABORT is only an example (and the question is "does it guarantee it" without any conditions). –  Chris Down Mar 28 '12 at 20:09
    
It is the only command for which 226 does not mean the data has been successfully transferred. –  psusi Mar 29 '12 at 14:22
add comment

MD5SUM or SHA1SUM may do the trick.

The problem then is that you either have to compute the checksum on the server you're uploading to or download the file from the server and compare. But that could also mean it wasn't downloaded properly...

share|improve this answer
add comment

It depends on what you mean by guarantee. 226 means the transfer finished without any error detected, so barring an undetected error corrupting the data, or the server crashing before it can commit it to disk from its cache or something, the files will be identical.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.