Re: IdFtp & IdFtpServer - downloading file in passive mode fails

Giganews Newsgroups
Subject: Re: IdFtp & IdFtpServer - downloading file in passive mode fails
Posted by:  Remy Lebeau \(TeamB\) (
Date: Wed, 10 Sep 2008

"Tomasz B" <t.berg.REMO…> wrote in message

> During debuging server application I found out that idFtpServer received
> port param of OnServerPASVReply event and sent it into a client idFTP
> (I'm able to read it in idFTP OnDataChannelCreate event) but IdFtp get()
> method threw an EIdSockerError 10061 when try to connect.

For that to happen, the client is trying to connect to an IP/Port that does
not actually have a server listening on it.  Is there a firewall or router
between the client and server, by change?  Either one of those could be
altering the data that TIdFTPServer reports.  Or, in the case of a router,
you might not be proving the server's actual public IP/Port in the
OnPASVReply event.  Can you show the actual command/reply data that is being

> The only different is the fact that FileZilla Server open listening port
> before idFtp generate OnDataChannelCreate and idFTP server doesn't do it.

It should be.  TIdFTP sends the PASV command to the server before creating
the DataChannel socket that will handle the transfer.  TIdFTPServer opens a
listening socket immediately when it receives the PASV command.

> So if anybody has any advice for me or know how to run passive connection
> between indy FTP/FTPServer or has working example (maybe I forgot to set
> some parameter?)...

Please show your actual server code, and the low-level FTP command/reply
data that is being transmitted.

Remy Lebeau (TeamB)


In response to

IdFtp & IdFtpServer - downloading file in passive mode fails posted by Tomasz B on Tue, 09 Sep 2008