Net-FTP-File - Error in Net:FTP v2.75 ---works in v2.56

Posted on Thu May 11 20:42:11 2006 by mnagaraj
Error in Net:FTP v2.75 ---works in v2.56
I have isolated the following problem in version 2.75. It seems to work just fine in 2.56. Any ideas how to avoid this in v2.75. This is the link from Google Groups where I had posted it before finding out the version issue: Google Group Posting of the same Thanks, -mouli Mouli Nagarajan <code> #!/usr/local/bin/perl_5.6.1 use strict; use warnings; use Net::FTP; my $firm_user = ' user@anonymous.com'; my $firm_pass = 'password'; my $firm_dir = "upload"; my $outfile = "a"; print "Outfile: $outfile\n"; #Open a socks FTP connection my $ftp = Net::FTP->new('socks', Debug => 1); $ftp->login($firm_user, $firm_pass) or die "ERROR! Unable to connect to the FTP server: ". $ftp->message; $ftp->pasv(); #set the mode to ascii $ftp->ascii(); #all uploaded files are to be placed in the "upload" directory $ftp->cwd($firm_dir) or die "ERROR! Unable to 'cd' to 'upload' directory: ". $ftp->message; print $ftp->ls(); #put the outfile just created $ftp->put($outfile) or die "ERROR! Unable to ftp the file at this time: ". $ftp->message; $ftp->quit; print "$outfile was successfully sent via FTP to confirmIt.\n"; ### End of FTP </code> <STDOUT> Outfile: a Net::FTP>>> Net::FTP(2.75) Net::FTP>>> Exporter(5.562) Net::FTP>>> Net::Cmd(2.26) Net::FTP>>> IO::Socket::INET(1.25) Net::FTP>>> IO::Socket(1.26) Net::FTP>>> IO::Handle(1.21) Net::FTP=GLOB(0x31d40)<<< 220 Secure Gateway FTP server Net::FTP=GLOB(0x31d40)>>> user user@anonymous.com Net::FTP=GLOB(0x31d40)<<< 331-Connected to anonymous.com Net::FTP=GLOB(0x31d40)<<< 331-(vsFTPd 1.2.1) Net::FTP=GLOB(0x31d40)<<< 331 Please specify the password. Net::FTP=GLOB(0x31d40)>>> PASS .... Net::FTP=GLOB(0x31d40)<<< 230 Login successful. Net::FTP=GLOB(0x31d40)>>> PASV Net::FTP=GLOB(0x31d40)<<< 227 Passive mode entered (69,52,64,222,186,114) Net::FTP=GLOB(0x31d40)>>> TYPE A Net::FTP=GLOB(0x31d40)<<< 200 Switching to ASCII mode. Net::FTP=GLOB(0x31d40)>>> CWD pub/incoming Net::FTP=GLOB(0x31d40)<<< 250 Directory successfully changed. Net::FTP=GLOB(0x31d40)>>> PORT 69,52,99,54,137,32 Net::FTP=GLOB(0x31d40)<<< 200 PORT command successful. Consider using PASV. Net::FTP=GLOB(0x31d40)>>> NLST Net::FTP=GLOB(0x31d40)<<< 150 Here comes the directory listing. Net::FTP=GLOB(0x31d40)<<< 226 Directory send OK. Net::FTP=GLOB(0x31d40)>>> ALLO 16 Net::FTP=GLOB(0x31d40)<<< 202 ALLO command ignored. Net::FTP=GLOB(0x31d40)>>> PORT 69,52,99,54,137,35 Net::FTP=GLOB(0x31d40)<<< 530 Bad command sequence ERROR! Unable to ftp the file at this time: Bad command sequence </STDOUT>
Write a response