brewmaker has asked for the wisdom of the Perl Monks concerning the following question:
The debug:#!/usr/bin/perl -w my $host = "192.168.10.155"; my $file_name = "/home/testuser/filestore/WWWMSEXP.TXT"; my $dir = "mail"; my $getname ="WWWMSEXP.TXT"; my $username = "testuser"; my $password = "secret"; use Net::FTP; $ftp = Net::FTP->new($host, Timeout =>40, Debug =>1) or die "can't con +nect to host"; $ftp->login($username,$password) or die "can't log in to host"; $ftp->cwd($dir) or die "can't change directory"; $ftp->ascii(); $ftp->get($getname,$file_name) or die "can't get file"; $ftp->quit();
The file IS there and I can manually ftp to this client and get it.Net::FTP: Net::FTP(2.64) Net::FTP: Exporter(5.562) Net::FTP: Net::Cmd(2.21) Net::FTP: IO::Socket::INET(1.25) Net::FTP: IO::Socket(1.26) Net::FTP: IO::Handle(1.21) Net::FTP=GLOB(0x819dea4)<<< 220 Microsoft FTP Service Net::FTP=GLOB(0x819dea4)>>> user testuser Net::FTP=GLOB(0x819dea4)<<< 331 Password required for testuser. Net::FTP=GLOB(0x819dea4)>>> PASS .... Net::FTP=GLOB(0x819dea4)<<< 230 User testuser logged in. Net::FTP=GLOB(0x819dea4)>>> CWD mail Net::FTP=GLOB(0x819dea4)<<< 250 CWD command successful. Net::FTP=GLOB(0x819dea4)>>> TYPE A Net::FTP=GLOB(0x819dea4)<<< 200 Type set to A. Net::FTP=GLOB(0x819dea4)>>> PORT 192,168,10,221,9,213 Net::FTP=GLOB(0x819dea4)<<< 200 PORT command successful. Net::FTP=GLOB(0x819dea4)>>> RETR WWWMSEXP.TXT Net::FTP=GLOB(0x819dea4)<<< 150 Opening ASCII mode data connection for + WWWMSEXP.TXT(3180636 bytes). can't get file at ./mtest.pl line 18.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::FTP and Microsoft FTP Service
by defyance (Curate) on Mar 26, 2003 at 00:31 UTC | |
|
Re: Net::FTP and Microsoft FTP Service
by Thelonius (Priest) on Mar 26, 2003 at 01:02 UTC | |
by brewmaker (Novice) on Mar 26, 2003 at 21:07 UTC | |
|
Re: Net::FTP and Microsoft FTP Service
by rah (Monk) on Mar 26, 2003 at 02:04 UTC | |
|
Re: Net::FTP and Microsoft FTP Service
by thunders (Priest) on Mar 26, 2003 at 01:21 UTC |