Discussion:
TidFTP - Error on List method
(too old to reply)
Mike Manning
2005-07-12 14:42:09 UTC
Permalink
Hi all
Excuse my ignorance but my knowledge of ftp is miniscule !
I just need my delphi 7 app to download a directory listing from the ftp
server.

When I call the list method of idFTP, I get an exception:
"EidProtocolReplyError with message 'PORT: Not Owner'"

Can anyone tell me what this means. I'm running the program on Win2k
machine behind a router which does port translation, but I would not have
thought that would cause any issues.

thanks

Mike
Remy Lebeau (TeamB)
2005-07-12 19:02:33 UTC
Permalink
Post by Mike Manning
"EidProtocolReplyError with message 'PORT: Not Owner'"
Can anyone tell me what this means.
In order to download a directory listing, a secondary socket connection has
to be established between the client and server. Who connects to whom is
dictated by the PORT and PASV commands. The PORT command is sent when the
client is going to open its own server socket that the FTP server then
connects to. The PASV command is sent when the FTP server should open
another server socket that the client will connect to. The reason for
having two possible directions is to handle situations where firewalls or
routers block on direction, or the other can be used instead.

An EIdProtocolReplyError exception means that your client sent a command to
the server and the server actively rejected the command and sent an error
back to the client. As for the actual text of the error, that is at the
server's descretion.
Post by Mike Manning
I'm running the program on Win2k machine behind a router which does
port translation, but I would not have thought that would cause any
issues.

It can be. Try setting your TIdFTP.Passive property to True before calling
List().


Gambit
Mike M
2005-07-13 05:25:18 UTC
Permalink
Thanks Remy
You pointed me in the right direction and it turned out to be a firewall
issue.
Mike
Post by Remy Lebeau (TeamB)
Post by Mike Manning
"EidProtocolReplyError with message 'PORT: Not Owner'"
Can anyone tell me what this means.
In order to download a directory listing, a secondary socket connection has
to be established between the client and server. Who connects to whom is
dictated by the PORT and PASV commands. The PORT command is sent when the
client is going to open its own server socket that the FTP server then
connects to. The PASV command is sent when the FTP server should open
another server socket that the client will connect to. The reason for
having two possible directions is to handle situations where firewalls or
routers block on direction, or the other can be used instead.
An EIdProtocolReplyError exception means that your client sent a command to
the server and the server actively rejected the command and sent an error
back to the client. As for the actual text of the error, that is at the
server's descretion.
Post by Mike Manning
I'm running the program on Win2k machine behind a router which does
port translation, but I would not have thought that would cause any
issues.
It can be. Try setting your TIdFTP.Passive property to True before calling
List().
Gambit
Loading...