Reposted with debug detail now included.
List directory hangs also.
Any ideas?
Cheers,
Kerry.
ftpget1.cgi (debug=>1 for Net::FTP) output is:
Net::FTP: Net::FTP(2.56)
Net::FTP: Exporter(5.562)
Net::FTP: Net::Cmd(2.18)
Net::FTP: IO::Socket::INET(1.25)
Net::FTP: IO::Socket(1.26)
Net::FTP: IO::Handle(1.21)
Net::FTP=GLOB(0x8282e70)<<< 220 Serv-U FTP-Server v2.4a for WinSock ready...
logging in
Net::FTP=GLOB(0x8282e70)>>> PASV
Net::FTP=GLOB(0x8282e70)<<< 530 Not logged in.
Net::FTP=GLOB(0x8282e70)>>> user myuserid
Net::FTP=GLOB(0x8282e70)<<< 331 User name okay, need password.
Net::FTP=GLOB(0x8282e70)>>> PASS ....
Net::FTP=GLOB(0x8282e70)<<< 230-Welcome to the Big Pond Cable Web Hosting
service.
Net::FTP=GLOB(0x8282e70)<<< 230 User logged in, proceed.
logged in
Net::FTP=GLOB(0x8282e70)>>> CWD /
Net::FTP=GLOB(0x8282e70)<<< 250 Directory changed to /
Net::FTP=GLOB(0x8282e70)>>> PWD
Net::FTP=GLOB(0x8282e70)<<< 257 "/" is current directory.
/
Net::FTP=GLOB(0x8282e70)>>> PORT 144,137,96,177,19,0
Net::FTP=GLOB(0x8282e70)<<< 200 PORT Command successful.
Net::FTP=GLOB(0x8282e70)>>> RETR index.html
Net::FTP=GLOB(0x8282e70)<<< 150 Opening ASCII mode data connection for
index.html (1353 bytes).
[root@gateway cgi-bin]# ncftpget -d stdout -u myuserid -p mypassword
ftp.users.bigpond.net.au /tmp index.html
Remote server is running Serv-U FTP-Server.
220: Serv-U FTP-Server v2.4a for WinSock ready...
Connected to ftp.users.bigpond.net.au.
Cmd: USER myuserid
331: User name okay, need password.
Cmd: PASS xxxxxxxx
230: Welcome to the Big Pond Cable Web Hosting service.
User logged in, proceed.
Cmd: PWD
257: "/" is current directory.
Logged in to ftp.users.bigpond.net.au as myuserid.
Cmd: FEAT
500: 'FEAT': command not understood.
Cmd: CLNT NcFTPGet 3.0.2
500: 'CLNT': command not understood.
Cmd: TYPE I
200: Type set to I.
Cmd: SIZE index.html
213: 1353
Cmd: MDTM index.html
213: 20020221135208
Cmd: REST 1
350: Restarting at 1 - send STORE or RETRIEVE to initiate transfer.
Cmd: REST 0
350: Restarting at 0 - send STORE or RETRIEVE to initiate transfer.
Cmd: PASV
227: Entering Passive Mode (139,134,5,124,11,13)
Cmd: RETR index.html
150: Opening BINARY mode data connection for index.html (1353 bytes).
/tmp/index.html: ETA: 0:00 1.32/ 1.32 kB 1.46
MB/s 226: Maximum disk quota limited to 10240 Kbytes
Used disk quota 9759 Kbytes, available 480 Kbytes
Transfer complete.
/tmp/index.html: 1.32 kB 21.86kB/s
Cmd: QUIT
221: Goodbye!
> ----- Original Message -----
> From: "Kerry Seibold" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, February 21, 2002 3:46 PM
> Subject: Perl Net::FTP problem
>
>
> > Hi all,
> > >From O'Reilly "Perl in a Nutshell" P441 Net::FTP
> >
> > ncftpget -u myuserid -p mypassword ftp.users.bigpond.net.au /tmp
> index.html
> > works fine but my script (see below) hangs at
> > $ftp->get($filename);
> > If I comment out the get line it works fine.
> > #$ftp->get($filename);
> >
> > Anyone know what the problem is?
> > I am running this from the firewall (RH7.1) machine.
> >
> >
> > #!/usr/bin/perl -w
> >
> > # ftpget.cgi rev1.0 21/02/2002
> > # get a file from an FTP site
> >
> > use Net::FTP;
> >
> > $hostname='ftp.users.bigpond.net.au';
> > $username='myuserid';
> > $password='mypassword';
> > $home='/';
> > $filename='index.html';
> >
> > $ftp = Net::FTP->new($hostname); #construct object
> > print "logging in\n";
> > $ftp->pasv();
> > $ftp->login($username,$password);
> > print "logged in\n";
> > $ftp->cwd($home),"\n";
> > $directory=$ftp->pwd();
> > print "$directory\n";
> > $ftp->get($filename);
> > print "logging out\n";
> > $ftp->quit;
> > print "logged out\n";
> > exit;
> >
> >
> >
> >
> > -
> > [EMAIL PROTECTED] is for LINUX-RELATED POSTS ONLY. For details and
> information
> > on how to unsubscribe, see http://www.luv.asn.au/mailinglists.html.
> >
>
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug