Click here to get back home

Net::FTP : Passive mode does not work as documented.

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Net::FTP : Passive mode does not work as documented. ro.naldfi.scher 06-20-2006
Posted by ro.naldfi.scher on June 20, 2006, 5:39 am
Please log in for more thread options


A few of our servers reject connection via Net::FTP with the error

"PASV is disabled"

>From the wording I guessed that this means that our client program
tries to establish the connection via passive mode, but the server
only supports active mode.

>From the perldoc documentation of Net::FTP I concluded that active
mode is the default when creating a Net::FTP object (unless one
explicitly sets Passive=>0 in the constructor, which we don't). So
it seems that the documentation for Net::FTP does not match the
implementation.

(Additional note:

To double-check this, I ran the client again, but now with setting
the environment variable FTP_PASSIVE to zero. The transfer
now works.

Similarily, if I set FTP_PASSIVE to 1 makes the error message
reappear, as does an explicit call to the pasv method).

Ronald


Posted by Chris Davies on June 30, 2006, 4:58 am
Please log in for more thread options


ro.naldfi.scher@gmail.com wrote:
> A few of our servers reject connection via Net::FTP with the error
> "PASV is disabled"

> From the perldoc documentation of Net::FTP I concluded that active
> mode is the default when creating a Net::FTP object (unless one
> explicitly sets Passive=>0 in the constructor, which we don't). So
> it seems that the documentation for Net::FTP does not match the
> implementation.

The default value for Passive is actually derived via the settings in
Net::Config, which would have been configured when the Net:: modules
were first built and installed.

# Passive default for internal hosts
perl -MNet::Config -e 'print $Net::Config::NetConfig,"\n"'

# Passive default for external hosts
perl -MNet::Config -e 'print $Net::Config::NetConfig,"\n"'

Chris

Similar ThreadsPosted
Is there a contest for the worst documented module? January 12, 2006, 5:56 am
Net::SFTP - setting binary mode on Windows January 17, 2007, 5:55 am
Subclassing 'Math::BigFloat' gives 'Unknown round mode' error July 9, 2004, 4:54 pm
win32::api doesn't work? January 18, 2005, 11:47 pm
NET:LDAP start_tls does not work July 7, 2004, 12:19 pm
Compress::Bzip2 needs work April 20, 2005, 9:41 pm
Apache::DBI + mod_perl 2.0.1. Please, help! Cannot get it work! November 2, 2005, 7:58 am
Custom PM Modules Won't Work May 2, 2006, 7:17 pm
mod_perl2 won't work w/ActivestateP588 V.822 August 7, 2007, 5:35 pm
H Start your own business doing affiliate work. H$OU,lh_ January 2, 2005, 12:41 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap