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



ro.naldfi.scher@xxxxxxxxx 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{ftp_int_passive},"\n"'

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

Chris
.