Question on Net::FTP.

From: Silky Manwani (silkym_at_mac.com)
Date: 05/28/04


To: beginners@perl.org
Date: Thu, 27 May 2004 16:40:22 -0700

Hello,

I have this program where I am trying to ftp a file from one machine to
another.

so code somewhat looks like this:

$ftp = Net::FTP->new(host, (Debug => 1, Timeout =>600, Passive =>1));
$ftp->login($user,$pass);
$ftp->binary();
$ftp->put($file);

At some point this code was working and now it hangs at

$ok = CMD_INFO == $ftp->response(); in FTP.pm

The file gets created on the remote machine but it's of zero length..So
the contents don't get copied.

The output looks like this:

Net::FTP=GLOB(0x101792d4)>>> user abc
Net::FTP=GLOB(0x101792d4)<<< 331 Password required for
abc.
Net::FTP=GLOB(0x101792d4)>>> PASS ....
Net::FTP=GLOB(0x101792d4)<<< 230-
Net::FTP=GLOB(0x101792d4)<<< Welcome to Darwin!
Net::FTP=GLOB(0x101792d4)<<< 230 User abc logged in.
Net::FTP=GLOB(0x101792d4)>>> CWD
/abd/folder
Net::FTP=GLOB(0x101792d4)<<< 250 CWD command
successful.
Net::FTP=GLOB(0x101792d4)>>> TYPE I
Net::FTP=GLOB(0x101792d4)<<< 200 Type set to I.
Net::FTP=GLOB(0x101792d4)>>> ALLO 382
Net::FTP=GLOB(0x101792d4)<<< 202 ALLO command ignored.
Net::FTP=GLOB(0x101792d4)>>> PASV
Net::FTP=GLOB(0x101792d4)<<< 227 Entering Passive Mode
(17,213,12,192,192,245)
Net::FTP=GLOB(0x101792d4)>>> STOR TingTong

So, it just hangs at the last STOR. (Which tries to copy the file and
is waiting for some response!!)

Any ideas..!?

Thanks.



Relevant Pages

  • Re: Access to external FTP server
    ... I am sorry for the delayed response and the inconvenience this issue has ... Since you can use WS_FTP to upload to and download from the previous FTP ... Microsoft CSS Online Newsgroup Support ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)
  • FTP Connection Closed Error
    ... I'm beginning to think that when I get this error, the request for the ... I have the KeepAlive property of the FTP object set to FALSE and the TimeOut ... // Execute the request and get the response from the FTP server ... private FtpWebRequest BuildRequest ...
    (microsoft.public.dotnet.general)
  • Re: ftp connection in VB.NET
    ... The goal here is to return a list of all the files and directories in an FTP ... ___ RESPONSE IS COMPLETE ... 200 PORT command successful. ... > server, then the cwd \directoryname will success, and now current ...
    (microsoft.public.dotnet.framework)
  • Re: How to make ftp server less verbose
    ... > modem-equipped devices to our FTP server and we found that FTP protocol ... suspect the response messages as being a significant portion of that. ... writing a relatively simple proxy in front of the FTP server? ... you'll need to pass on faithfully to the FTP client is the 227 response from ...
    (microsoft.public.inetserver.iis.ftp)
  • Re: OT ftp mget
    ... I found out that including this command in the scriptfile confuses ftp; somehow it doesn't parse the logon correctly. ... 200 PORT command successful. ... So this setup seems to work, apart from the fact that the two files seem to be unavailable. ...
    (comp.sys.ibm.ps2.hardware)