Page 1 of 1

TScSFTPClient downloading file with 0 KB

Posted: Tue 03 Jun 2014 00:51
by JacksonGomes
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

Re: TScSFTPClient downloading file with 0 KB

Posted: Wed 04 Jun 2014 10:11
by Dimon
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.

Re: TScSFTPClient downloading file with 0 KB

Posted: Thu 05 Jun 2014 04:50
by JacksonGomes
THanks for the reply.

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

Re: TScSFTPClient downloading file with 0 KB

Posted: Sun 08 Jun 2014 22:35
by JacksonGomes
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

Re: TScSFTPClient downloading file with 0 KB

Posted: Mon 09 Jun 2014 23:47
by JacksonGomes
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

Re: TScSFTPClient downloading file with 0 KB

Posted: Mon 23 Jun 2014 08:42
by Dimon
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].

Re: TScSFTPClient downloading file with 0 KB

Posted: Wed 25 Jun 2014 21:46
by JacksonGomes
I'm talking with my customer about it. PLease send me a private message so I can provide you the details

Re: TScSFTPClient downloading file with 0 KB

Posted: Thu 26 Jun 2014 13:53
by Dimon
I have answered you by e-mail.