Re: Net::FTP problem



soup_or_power@xxxxxxxxx wrote:
> The following code is generating the error: can't connect (in the code
> below) I'm guessing the FTP is sending the username and hostname
> separated by @ instead of sending just the host name followed by user

No. The error message is misleading. The routine attempts to make a
connexion to the $ftp_host. This fails.

> name and password and commands. It worked fine for some time but now
> quit on me. Thanks for any of your help.

This is a major clue that this function is not at fault but that
something external has changed.

Perhaps the values that are being handed to the function mean that
$ftp_host receives a invalid value which in turn sets $host_site to be
invalid.

Or maybe there have been system or network changes so that the host
is no longer reachable either through the network or by whatever name is
being used - perhaps someone removed "storm" from the /etc/aliases file
- just a wild guess.

The best thing is to try a direct FTP session from the command line to
the host and see if a connexion can be made.

> sub get_ftp_handle {
> my($self, $ftp_host, $ftp_user, $ftp_pwd)=@_;
>
> my $ftp_site = $ftp_host || "storm";
> my $ftp_pass = $ftp_pwd || "pqww2o4";
> $ftp_user ||= "qauser";
>
> my $ftp = Net::FTP->new($ftp_site) || do {
> warn "$ftp_user\@$ftp_site: can't connect\n";

Should be:

warn "$ftp_site: can't connect\n";

> return -1;
> };
> $ftp->login($ftp_user, $ftp_pass) || warn "$ftp_user\@$ftp_site:
> can't login\n";
> $ftp->binary();
> return $ftp || die("cannot open ftp connection");
> }


Axel

.



Relevant Pages

  • Re: custom, network install server
    ... > Has anyone ever managed to use the theoretical install from host to host ... > useradd -m swadmin ... > On the new box I can ftp oldbox and log in as swadmin no problems ...
    (comp.unix.sco.misc)
  • Re: SYSCONF and FTPIT jobs
    ... belonging to the 192.168/16 netblock and is connected to the ftp host via ... I also have concerns about the generated ftpin file. ... 200 PORT command successful. ...
    (comp.sys.hp.mpe)
  • Re: Can you use an FTP program with dial-up???
    ... > of them mention that they support FTP as opposed to BROWSER support. ... Yes you can use FTP upload to your web site if the host supports FTP, ... Since both methods involve use of the same connection from your ...
    (alt.html)
  • Re: ISA - Block External IP from Accessing Server
    ... This helps to reduce the attack surface of your server by eliminating any foreign host from accessing your system unless explicity allowed. ... On the right side of the window under "Firewall Policy Tasks" click "Create a new Access Rule" ... Expand the "All Protocols" tree and select "FTP". ... Instead of setting a DENY action, set an ALLOW action and provide the source IP of those hosts you WANT to access the FTP server. ...
    (microsoft.public.windows.server.sbs)
  • Re: no index files appearing in ftp when publishing website
    ... I didn't actually get a response but my host company were able to resolve ... "DavidF" wrote: ... instead of smart ftp but I had no joy with that either. ... 2002 of Publisher": ...
    (microsoft.public.publisher.webdesign)