Folder Sync and FTP

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Cooperdale
Junior Member
Junior Member
Posts: 69
Joined: 2008-09-08, 23:03 UTC

Folder Sync and FTP

Post by *Cooperdale »

Hello, can somebody give me some details on the Sync Folder feature in conjunction with Ftp? Namely, what's the reason for the Compare by content option being disabled on many Ftp sites?

I've read the explanation on the wiki but if someone can go into a little bit more detail it'd be great.

I think a difference may be Windows vs Linus hosting?
Sob
Power Member
Power Member
Posts: 945
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

To compare two files by content, you must either compare them byte by byte or find some other way how to tell if they are the same. First option, even if most reliable, don't go well together with FTP, because it requires downloading the whole file. Second one is to use hashes/crcs and only compare those, which works quite well. You read the local file and compute its hash. Then you tell the server to read the remote file and only return computed hash. Which makes huge difference because hash only has few bytes, even if file itself has several gigabytes in size.

There's just one problem. FTP protocol does not have any official command for computing hashes yet. But because it's useful, few unofficial were created and implemented by various servers. Obviously, as unofficial, only by some of them. The commands should be XCRC, XSHA1, XMD5, MD5 and HASH (the last one might become official FTP command one day, but not yet). If your server supports any of these commands, Compare by content should work. Otherwise you can't use it.
Cooperdale
Junior Member
Junior Member
Posts: 69
Joined: 2008-09-08, 23:03 UTC

Post by *Cooperdale »

Ok, thanks. The strange thing is, most of the sites I manage have the same host, but the ftp content comparison is active only on a couple of them. I guess the host's servers have undocumented differences between them.
Sob
Power Member
Power Member
Posts: 945
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

Check the log. Near the beginning there will be the command FEAT and the response after that is the list of advanced commands supported by server. Look for the commands mentioned above.
Cooperdale
Junior Member
Junior Member
Posts: 69
Joined: 2008-09-08, 23:03 UTC

Post by *Cooperdale »

Thanks a lot, I'll check it out.
Post Reply