Paolo Gabrielli\’s Blog

Just another near empty WordPress.com’s weblog. But this is from Paolo ‘pkirk’ Gabrielli.

NcFTP keeps downloading the file

Posted by paolo on 2 February, 2016

I was using NcFTP (NcFTP 3.2.5/474 Feb 02 2011, 05:13 PM) to download a file from another server that uses ProFTPD (1.3.5a). The default behaviour is to skip the file if it already exists, but that the file was being downloaded every time, because the size seemed different:

The local file “httpdocs/license.txt” already exists.
Local:         19545 bytes, dated Thu 07 Jan 2016 11:25:02 AM CET.
Remote:        19930 bytes, dated Thu 07 Jan 2016 11:25:02 AM CET.

Others files were OK:

The local file “httpdocs/index.php” already exists.
Local:         12872 bytes, dated Tue 17 Nov 2015 04:24:58 PM CET.
Remote:        12872 bytes, dated Tue 17 Nov 2015 04:24:58 PM CET.
(Files are identical, skipped)

I didn’t have access to the ProFTPD server, but the original file (from the author’s .zip) was:

license.txt: ASCII English text, with very long lines, with CRLF line terminators

while the downloaded one is

license.txt: ASCII English text, with very long lines

I tried to download it after issuing the “binary” or “ascii” command, but the outcome was the same.

**If I download that file with my Cyberduck on OSX, the size is the “correct” one, the 19930 bytes.**

So seemed that NcFTP was changing the file, but it was unlikely, given the fact that the file transfer was in binary.

I searched the whole Internet, and I tried to sleep over it, but nothing came out. As the last resort I contacted (very fast!) NcFTP support and I found out about the auto-ascii variable that says:

auto-ascii
If set to a list of pipe-character delimited extensions, files with these extensions will be sent in ASCII mode even if binary mode is currently in effect. This option allows you to transfer most files in binary, with the exception of a few well-known file types that should be sent in ASCII. This option is enabled by default, and set to a list of common extensions (e.g., .txt and .html).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: