My FTP sites are configured, manually, for binary download only.
I'm downloading a ZIP file which can be opened only the second time i download it.
It seems that the binary download is activated only the second time i download a file.
What can be the reason?
Please go to Tools -> Output Window and paste the FTP log from there. It should show Opus sending the BIN command before the download and the server's response.
Hello Leo,
Here's the log (I've erased identifying details):
Opening Connection 195.55.127.106:21
220 chanseyn1 FTP server (Version 1.9.2.4 - 2005/01/11 13:03:28) ready.
331 Password required for ********.
230 User ********logged in.
215 UNIX Type: L8
500 'FEAT': command unrecognized.
501 REST: Resuming transfers not allowed in ASCII mode
200 Type set to I
257 "/" is current directory.
250 CWD command successful
257 "/outgoing" is current directory.
227 Entering Passive Mode (195,55,127,106,231,85).
150 Opening ASCII mode data connection for file list
443 bytes received in 0.407 seconds (0.1000 Kbytes/sec)
226 Transfer complete.
250 CWD command successful
257 "/outgoing" is current directory.
250 CWD command successful
257 "/outgoing/articles" is current directory.
227 Entering Passive Mode (195,55,127,106,165,78).
150 Opening ASCII mode data connection for file list
324 bytes received in 0.438 seconds (0.0 Kbytes/sec)
226 Transfer complete.
227 Entering Passive Mode (195,55,127,106,164,116).
150 Opening BINARY mode data connection for ARTIIL.ZIP (79637 bytes)
69632 bytes received in 4.797 seconds (13.688 Kbytes/sec)
226 Transfer complete.
227 Entering Passive Mode (195,55,127,106,159,175).
150 Opening BINARY mode data connection for ARTIIL.ZIP (79737 bytes)
71680 bytes received in 5.15 seconds (13.688 Kbytes/sec)
226 Transfer complete.
You can see that i've downloaded the file twice since after the first time, the ZIP file couldn't be opened.
After the second download, it was ok.
The problem occurs whenever i download a file after connecting to an FTP site. I always have to download it twice.. It only happens for the first file and afterwards, every file is ok.
Please edit the FTP Address Book entry for the site and go to the Display tab for the site's entry. There's a Log section at the bottom of the tab with an Enable debug checkbox. Turn that on, then try again and see what's in the log.
Doing that will tell us what commands Opus is sending to the server. From the log you've pasted it looks like Opus is trying to do a binary transfer but we can't see what was actually sent, which might reveal something.
FWIW I suspect there is something odd going on here because the second time you download the file you get more bytes but it still doesn't match the size that the server reports for the file, and the reported size actually changes from one download to the next:
1st download: 69632 bytes
2nd download: 71680 bytes
1st Reported size: 79637 bytes
2nd Reported size: 79737 bytes
NONE of those sizes are consistent.
The file isn't being modified on the server as you download it, is it?
Hello Leo,
The file isn't changed on the server.
Here's the debug log:
Opening Connection 195.55.127.106:21
220 chanseyn1 FTP server (Version 1.9.2.4 - 2005/01/11 13:03:28) ready.
--> USER ********
331 Password required for ********.
--> PASS ...
230 User ******** logged in.
--> SYST
215 UNIX Type: L8
--> FEAT
500 'FEAT': command unrecognized.
--> REST 100
501 REST: Resuming transfers not allowed in ASCII mode
--> TYPE I
200 Type set to I
--> PWD
257 "/" is current directory.
--> CWD /outgoing/
250 CWD command successful
--> PWD
257 "/outgoing" is current directory.
--> PASV
227 Entering Passive Mode (195,55,127,106,140,70).
--> LIST -alF
443 bytes received in 0.359 seconds (0.1000 Kbytes/sec)
150 Opening ASCII mode data connection for file list
226 Transfer complete.
--> CWD /outgoing
250 CWD command successful
--> PWD
257 "/outgoing" is current directory.
--> CWD articles
250 CWD command successful
--> PWD
257 "/outgoing/articles" is current directory.
--> PASV
227 Entering Passive Mode (195,55,127,106,220,21).
--> LIST -alF
150 Opening ASCII mode data connection for file list
324 bytes received in 0.328 seconds (0.0 Kbytes/sec)
226 Transfer complete.
--> PASV
227 Entering Passive Mode (195,55,127,106,172,157).
--> RETR ARTIIL.ZIP
150 Opening BINARY mode data connection for ARTIIL.ZIP (79637 bytes)
73728 bytes received in 5.234 seconds (13.688 Kbytes/sec)
226 Transfer complete.
--> PASV
227 Entering Passive Mode (195,55,127,106,194,27).
--> RETR ARTIIL.ZIP
150 Opening BINARY mode data connection for ARTIIL.ZIP (79737 bytes)
71680 bytes received in 10.16 seconds (6.856 Kbytes/sec)
226 Transfer complete.
Again, i downloaded the file twice.
The first time the zip is corrupted and the second time its ok.
Something is clearly wrong with the server as it is reporting different sizes for the file both times, and neither size it reports matches the size that it actually sends to Opus.
[quote]--> TYPE I
200 Type set to I [/quote]
That's Opus setting the server to binary mode and the server apparently responding to it.
The file size stuff is very, very odd. Do you see the same problem if you use a different FTP client with the same server?
I also download the file on a daily basis using a DOS batch file and it ok the first time.
How are you initiating the copy in Opus? If you're using drag & drop try using the Copy button on the toolbar instead.
Trying with another GUI FTP client might be useful, especially in PASV mode. (Or try turning off PASV mode in Opus.)