Link to home
Start Free TrialLog in
Avatar of andieje
andieje

asked on

can't use binary transfer for ftp

Hi

I am using Ubuntu Linux on a virtual machine connected to windows on a home pc.

I am running a perl program which is giving me this message: error cannot use binary transfer. The error comes from the line highlighted below
my $ftp;
      $ftp = Net::FTP->new( "$dbsnp_ftp_site", Debug => 0, Passive => 1 )
        or die "Cannot connect to $dbsnp_ftp_site : $@";
      $ftp->login( "anonymous", "$email_address" )
        or die "Cannot log in ", $ftp->message;
      print STDOUT
          "Successfull anonymous login into $dbsnp_ftp_site, password = $email_address\n";

      $ftp->pasv() or die "\nERROR: cannot use passive mode: ", $ftp->message;
      $ftp->binary()
        or die "\nERROR: cannot use binary transfer: ", $ftp->message; <=======!!!
      my $dir = $opt{ftp_dir}->{SCHEMA}->{$type};
      $ftp->cwd($dir)
        or die "\nERROR: cannot enter directory $dir: ", $ftp->message;


Do you have any idea why this would fail? I've had problems doing ftp before I'm sure because i couldn't go into passive mode i think

many thanks
ASKER CERTIFIED SOLUTION
Avatar of Pieter Jordaan
Pieter Jordaan
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of andieje
andieje

ASKER

i think it was a network problem as all is well now