CC: | jkeenan [...] cpan.org |
Subject: | Possible Net::Ftp bug |
This ticket originated as https://rt.perl.org/Ticket/Display.html?id=132467. Since Net::FTP is maintained upstream on CPAN, I am transferring that bug report here. There were several image files attached to 132467 which I have not attempted to transfer. -- jkeenan
Hello,
I have been trying for the past day to script FTP access to my ftp system. I got it down to the point where I had two Wireshark traces side-by-side with the same commands sent and in the scripting case, it looks like the lower-level Perl libraries do something strange, resulting in an error message of:
Net::FTP=GLOB(0x3ec6618)<<< 450 Transfer aborted. Link to file server lost
I have attached screenshots of the Wireshark traces - one that worked and the scripted one that failed (can't provide the full Wireshark trace because it includes the username/password combination. However, the command sequence was:
binary
cd /public_html/GeneratedFiles/CdCovers
put FilesToUpload/CdCovers/I_Love_You__Dude.jpg
quit
The file is 5803 bytes long.
The perl script I was using did the following (note I changed the ftp server name, my username, and my password):
my $FtpSession = Net::FTP->new("ftp.server.com", Timeout => 120, Passive => 0, Hash => \*STDERR, Debug => 1) or die "Cannot connect FTP session: $@";
$FtpSession->login(username,password) or die "Cannot login: $@";
$FtpSession->binary or die "Cannot set binary: $@";
my $DataConnection = $FtpSession->stor("I_Love_You__Dude.jpg") or die "Can't open data connection";
my $AmountWritten = $DataConnection->write($string, $Filesize);
$DataConnection->close();
$FtpSession->close();
I tried using the $FtpSession->Put() method, but it had the same result. I went with the above method during debugging because it allowed me to get the exact same command sequence as the manual method of ftp.
I have also attached (as a text file), my package versions along with the version of perl I'm using (ActiveState).
If there is further information I can provide, please let me know.
Thanks,
Brett
P.S. I also submitted to ActiveState, as I'm not sure what the correct procedure for reporting module bugs is.