rbi has asked for the wisdom of the Perl Monks concerning the following question:
It works fine when the firewall on my computer is off, but when the firewall is on it hangs at RETR YYY below:use strict; use warnings; use Net::FTP; my ($hostname,$user;$password) = ('A','B','C') # my settings here; my ($directory,$file) = ('XXX','YYY') # my settings here; my $ftp = Net::FTP->new($hostname, Debug => 1); $ftp->login($user,$password) or die "Cannot login ", $ftp->message; $ftp->cwd($directory); $ftp->binary(); $ftp->get($file) or print $ftp->message; $ftp->quit();
Instead, when I use the ftp command from prompt with the same commands, I can successfully retrieve the file both with and without the firewall.... Net::FTP=GLOB(0x970b00)>>> CWD XXX Net::FTP=GLOB(0x970b00)<<< 250 OK. Current directory is /XXX Net::FTP=GLOB(0x970b00)>>> TYPE I Net::FTP=GLOB(0x970b00)<<< 200 TYPE is now 8-bit binary Net::FTP=GLOB(0x970b00)>>> PORT 10,0,0,5,111,10 Net::FTP=GLOB(0x970b00)<<< 200 PORT command successful Net::FTP=GLOB(0x970b00)>>> RETR YYY
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::FTP get() problem
by Melly (Chaplain) on Oct 19, 2006 at 14:07 UTC | |
by rbi (Monk) on Oct 19, 2006 at 14:23 UTC |