Page 1 of 1

FileZilla 3.28 for linux corrupt files with transfer type Auto

Posted: 2019-07-08 11:57
by BajMile
Hello.

I spent 2 days, missed deadlines because of this problem! Please explain to me why this happens and what motivates FileZilla to corrupt and changes certain files during the FTP transfer when Transfer Type is Auto (the default)?

Here is description of what happened:
I installed the latest FileZilla on a Linux Ubuntu 18.04 x64 host to connect to a FTP server on an embedded device with Linux Ubuntu 18.04 aarm64. I have not changed anything in the FileZilla settings after the install.

I compiled one application with GNU C on the host and transferred it to the device with FileZilla. When I run it I got segmentation error:

dev@dev:~$ /home/test/cross
Segmentation fault (core dumped)

aarch64-linux-gnu-gcc cross.c -o cross --> cross do not works when copied with FileZilla to the device !!!
aarch64-linux-gnu-gcc cross.c --> but a.out works!!!??


It took me a lot of time checking many other things while to notice that when I built it without -o option, which with GNU C produces a.out, application runs fine. But -o option just copies the file. Finally I was able to copy it with SCP and it worked so this pinned the problem to FileZilla. I found that some symbols are corrupted by FileZilla and diff on the device shows that between a.out and cross there are differences. So FileZilla corrupted cross but not a.out!

Finally I found that problem solves when I changed Transfer->Transfer Type->Binary!!!

My question is what motivates this by DEFAULT the FileZilla to has Transfer Type Auto and to corrupt files without user to have been notified and only for certain file types? This was the last thing I expected from such world wide and well known application.

Thanks, quite a nasty welcome "feature" for the new users!!!

Re: FileZilla 3.28 for linux corrupt files with transfer type Auto

Posted: 2019-07-08 12:11
by boco
What extension do your corrupted files have? FTP supports Data Type determination by extension only. Linux has many files without name (dotfiles) or without extension. These are by default transferred as ASCII type, which will destroy them if the contents are binary. Uncheck the boxes to transfer them as Binary type.

Image

Re: FileZilla 3.28 for linux corrupt files with transfer type Auto

Posted: 2019-07-08 12:48
by BajMile
The corrupted files were without extension, in my case executables (binaries) build by the GNU C compiler, and by default are without extension. These executable were transferred by FileZilla as ASCII types and became corrupted leading to crashes which in some cases can cause even permanent damage, which is crazy. I do not understand at all the use-case about this ASCII type transfer? It should be Binary by default.

Re: FileZilla 3.28 for linux corrupt files with transfer type Auto

Posted: 2019-07-08 13:44
by boco
I have no idea why it is this way, the developer is very stubborn regarding these options. Default Binary would be much safer and not create data loss.

Oh, disclaimer: The latest FileZilla version is 3.43.0. We only support the latest version. I still answered you as the feature is unchanged in the latest release. Please look into ways to use the latest versions from here. Repo version might be years behind on features (they usually backport security fixes).

Re: FileZilla 3.28 for linux corrupt files with transfer type Auto

Posted: 2019-07-09 07:27
by botg
The reason is mostly Windows. The majority of users still use a Windows version with a notepad.exe incapable of *nix line endings.

Re: FileZilla 3.28 for linux corrupt files with transfer type Auto

Posted: 2019-07-10 01:58
by boco
@botg: I'm not talking about Binary in General, only about the two marked options. Having to select them if you need is a little inconvenience, but having enabled by default can be disastrous.

And, honestly, there are plenty of alternatives to the lacking Notepad application. Exactly like FileZilla is a (much better) alternative to the built-in, lacking Windows ftp,exe.