TScSFTPClient downloading file with 0 KB

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
JacksonGomes
Posts: 7
Joined: Tue 03 Jun 2014 00:41

TScSFTPClient downloading file with 0 KB

Post by JacksonGomes » Tue 03 Jun 2014 00:51

Hey guys:

We have an app that is using TScSFTPClient and when we download the file, the resulting file has 0 KB.

Using other FTP clients, like Filezilla, we can donwload the files correctly.

Any idea where/how to investigate this issue?

We are using version 6.2.3 04-Feb-14, but also tried with latest release.

Regards

--
Jackson Gomes / Flow Software

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: TScSFTPClient downloading file with 0 KB

Post by Dimon » Wed 04 Jun 2014 10:11

I can not reproduce the problem. Please make sure you use SFTP server for file downloading, not FTP. The SFTP protocol is not derived from the FTP protocol, and it is an independent protocol.

JacksonGomes
Posts: 7
Joined: Tue 03 Jun 2014 00:41

Re: TScSFTPClient downloading file with 0 KB

Post by JacksonGomes » Thu 05 Jun 2014 04:50

THanks for the reply.

I tested with other SFTP servers and it is working fine. It seems a failure on this particular SFTP server.

JacksonGomes
Posts: 7
Joined: Tue 03 Jun 2014 00:41

Re: TScSFTPClient downloading file with 0 KB

Post by JacksonGomes » Sun 08 Jun 2014 22:35

Can you please give me any hint on where I should start investigating?

I've tested downloading files from this particular server using Filezilla (SFTP) and it works fine. When I use TScSFTPClient it does not work, ie, the resulting files have 0 KB.

Should I open a support request?

Thanks

--
Jackson Gomes / Flow Software

JacksonGomes
Posts: 7
Joined: Tue 03 Jun 2014 00:41

Re: TScSFTPClient downloading file with 0 KB

Post by JacksonGomes » Mon 09 Jun 2014 23:47

Hi again:

I just tried the same SFTP server with another set of components (Eldos SecureBlackbox.VCL) and it works fine with the "problematic" SFTP server.

I tried debugging your code and the method below

procedure TScSFTPClient.DownloadFile(const Source, Destination: string; Overwrite: Boolean);
...
FCopyingRemoteFile := True;
try
...
...
Handle := OpenFile(Source, [foRead], nil);
finally
...
end;
...

the Handle result is always (0,0,0,0) on the problematic server. When I test it on other servers, the Handle has values different than 0s (not sure if it has any meanings for you).

Any thoughts?

Thanks

Jackson / Flow Software

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: TScSFTPClient downloading file with 0 KB

Post by Dimon » Mon 23 Jun 2014 08:42

Unfortunately, I still cannot reproduce the problem.
Can you provide access to your SFTP server to investigate the problem?

To investigate the problem, try opening a remote file by the OpenFile method with another Modes parameter, like [foRead, foWrite] or [foAppend, foCreate].

JacksonGomes
Posts: 7
Joined: Tue 03 Jun 2014 00:41

Re: TScSFTPClient downloading file with 0 KB

Post by JacksonGomes » Wed 25 Jun 2014 21:46

I'm talking with my customer about it. PLease send me a private message so I can provide you the details
Last edited by JacksonGomes on Sun 29 Jun 2014 23:30, edited 1 time in total.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: TScSFTPClient downloading file with 0 KB

Post by Dimon » Thu 26 Jun 2014 13:53

I have answered you by e-mail.

Post Reply