in reply to Net::FTP port inconsistencies

It's almost certainly a firewall issue, either at the linux oir windows end. Try putting the ftp client into passive mode - that usually resolves most such issues. When not in passive mode, ftp requires a second data conncection to be established from a ramdom port on the server to a random port on the client, which generally gets blocked by stateless firewalls.

Dave.

Replies are listed 'Best First'.
Re^2: Net::FTP port inconsistencies
by Anonymous Monk on Feb 18, 2005 at 15:38 UTC
    Hi Dave,

    Thanks for your reply. We already use passive mode as indicated by the code below:
    my $ftp = Net::FTP->new($self->{HOSTNAME}, "Firewall" => "", "Port" => 21, "Debug" => 0, "Passive" => 1);
    I just tried creating an FTP connection from the linux command line and I get the same problem, i.e. I can login and move to the relevant directory but the put command times out. Perhaps, this is a setting on the linux server??

    rgds
    Conor

      In passive mode, the data connection is initiated by the cleint, so it is likely to be the firewall on the server which is too strict.

      I'm too sure about the "Firewall" => ""; I'm not sure whether a blank proxy name acts the same as no proxy; you might want to comment out that line and see if it makes any difference (but it probably won't).

      A final suggestion would be to use sftp if possible - it's a lot more firewall friendly!

      Dave.