in reply to FTP Connection using the different Port than the default

That's the difference between active and passive FTP. The default mode of FTP is active, which means that for data transfer, a different channel is opened (and is initiated from the server). With passive mode, data and commands share the same channel.

Use the Passive option in your Net::FTP constructor (assuming you are using Net::FTP).

  • Comment on Re: FTP Connection using the different Port than the default

Replies are listed 'Best First'.
Re^2: FTP Connection using the different Port than the default
by Crackers2 (Parson) on Nov 22, 2006 at 16:37 UTC

    I don't think that's true. Passive mode will also open a different channel as far as I know.

    The only difference between active and passive mode is the direction of the data channel. In passive mode, the client will connect to the server, while in active mode the server will connect to the client.

    That being said, passive mode may get things working since the firewall may allow connections in the other direction.

    Update: I had active and passive reversed. Fixed now. See also http://slacksite.com/other/ftp.html