I am trying to write a perl script that needs to get the directory of the ftp-ed server. I have compiled Net-FTP-Common-2.9 from CPAN and it tries to get the directory of the FedWorld FTP Site site as a test and fails. Is there some security issue that E-Smith does not allow this or do I need to go elsewhere with this question? Results of the 'make test' below:
Net::FTP=GLOB(0x8385524)<<< 220- Welcome to the FedWorld FTP Site
Net::FTP=GLOB(0x8385524)<<< 220-
Net::FTP=GLOB(0x8385524)<<< 220-FedWorld is operated by the National Technical Information
Net::FTP=GLOB(0x8385524)<<< 220-Service, a self-supporting agency of the U.S. Dept of Commerce.
Net::FTP=GLOB(0x8385524)<<< 220-
Net::FTP=GLOB(0x8385524)<<< 220-If you have problems or questions about the FedWorld FTP site,
Net::FTP=GLOB(0x8385524)<<< 220-please call our help desk at (703)487-4223 or send E-mail to
Net::FTP=GLOB(0x8385524)<<< 220-helpdesk@fedworld.gov.
Net::FTP=GLOB(0x8385524)<<< 220-
Net::FTP=GLOB(0x8385524)<<< 220- FedWorld Contact Information
Net::FTP=GLOB(0x8385524)<<< 220- Modem: (703)321-3339
Net::FTP=GLOB(0x8385524)<<< 220- Telnet: fedworld.gov
Net::FTP=GLOB(0x8385524)<<< 220- FTP: ftp.fedworld.gov
Net::FTP=GLOB(0x8385524)<<< 220- WWW:
http://www.fedworld.govNet::FTP=GLOB(0x8385524)<<< 220-
Net::FTP=GLOB(0x8385524)<<< 220-Each directory on this FTP site contains a 00-index.txt file
Net::FTP=GLOB(0x8385524)<<< 220-that lists descriptions of the files in that directory. These
Net::FTP=GLOB(0x8385524)<<< 220-index files are updated daily at about 9:00 am eastern U.S. Time.
Net::FTP=GLOB(0x8385524)<<< 220-U.S. time. Note: all commands are logged on this server.
Net::FTP=GLOB(0x8385524)<<< 220-
Net::FTP=GLOB(0x8385524)<<< 220-Please use anonymous as your name and your E-mail address as
Net::FTP=GLOB(0x8385524)<<< 220-your password.
Net::FTP=GLOB(0x8385524)<<< 220-
Net::FTP=GLOB(0x8385524)<<< 220- NOTE: IRS (Internal Revenue Service) FORMS and PUBLICATIONS
Net::FTP=GLOB(0x8385524)<<< 220- have moved to ftp.irs.gov. We no longer provide
Net::FTP=GLOB(0x8385524)<<< 220- IRS FORMS and PUBLICATIONS at ftp.fedworld.gov.
Net::FTP=GLOB(0x8385524)<<< 220- Please ftp to ftp.irs.gov to get the latest IRS FORMS
Net::FTP=GLOB(0x8385524)<<< 220- and PUBLICATIONS
Net::FTP=GLOB(0x8385524)<<< 220-
Net::FTP=GLOB(0x8385524)<<< 220- Thank You
Net::FTP=GLOB(0x8385524)<<< 220-
Net::FTP=GLOB(0x8385524)<<< 220-
Net::FTP=GLOB(0x8385524)<<< 220- NOTE: IRS (Internal Revenue Service) FORMS and PUBLICATIONS
Net::FTP=GLOB(0x8385524)<<< 220- moved to ftp.irs.gov. We do not provide any IRS FORMS and
Net::FTP=GLOB(0x8385524)<<< 220- PUBLICATIONS anymore at ftp.fedworld.gov.
Net::FTP=GLOB(0x8385524)<<< 220-
Net::FTP=GLOB(0x8385524)<<< 220- Thanks
Net::FTP=GLOB(0x8385524)<<< 220-#0
Net::FTP=GLOB(0x8385524)<<< 220 ftp.fedworld.gov FTP server ready.
Net::FTP=GLOB(0x8385524)>>> user anonymous
Net::FTP=GLOB(0x8385524)<<< 331 Guest login ok, send your complete e-mail address as password.
Net::FTP=GLOB(0x8385524)>>> PASS ....
Net::FTP=GLOB(0x8385524)<<< 230 Guest login ok, access restrictions apply.
Net::FTP=GLOB(0x8385524)>>> CWD /pub/irs-98
Net::FTP=GLOB(0x8385524)<<< 250 CWD command successful.
Net::FTP=GLOB(0x8385524)>>> TYPE I
Net::FTP=GLOB(0x8385524)<<< 200 Type set to I.
Net::FTP=GLOB(0x8385524)>>> PORT 207,69,19,54,5,215
Net::FTP=GLOB(0x8385524)<<< 200 PORT command successful.
Net::FTP=GLOB(0x8385524)>>> NLST
Net::FTP=GLOB(0x8385524)<<< 425 Can't build data connection: Connection timed out.
t/ls................FAILED tests 1-4
Failed 4/4 tests, 0.00% okay
t/xfer.............."my" variable $retval masks earlier declaration in same scope at t/xfer.t line 39.
"my" variable $retval masks earlier declaration in same scope at t/xfer.t line 46.
$common = {
'Pass' => 'tbone@cpan.org',
'RemoteDir' => '/',
'Host' => 'ftp.fcc.gov',
'Type' => 'I',
'User' => 'anonymous'
};
$netftp = {
'Timeout' => 120,
'Debug' => 1
};
Net::FTP: Net::FTP(2.65)
Net::FTP: Exporter(5.562)
Net::FTP: Net::Cmd(2.21)
Net::FTP: IO::Socket::INET(1.25)
Net::FTP: IO::Socket(1.26)
Net::FTP: IO::Handle(1.21)
Net::FTP: Unexpected EOF on command channel at t/xfer.t line 33
Can't call method "cwd" on an undefined value at blib/lib/Net/FTP/Common.pm line 205.
t/xfer..............dubious
Test returned status 9 (wstat 2304, 0x900)
DIED. FAILED tests 1-3
Failed 3/3 tests, 0.00% okay
Failed Test Status Wstat Total Fail Failed List of Failed
--------------------------------------------------------------------------------
t/dir.t 1 1 100.00% 1
t/grep.t 2 2 100.00% 1-2
t/ls.t 4 4 100.00% 1-4
t/xfer.t 9 2304 3 3 100.00% 1-3
Failed 4/5 test scripts, 20.00% okay. 10/11 subtests failed, 9.09% okay.
make: *** [test_dynamic] Error 2
[root@limelight Net-FTP-Common-2.9]# make install
Installing /usr/lib/perl5/site_perl/5.6.1/TestConfig.pm
Installing /usr/lib/perl5/site_perl/5.6.1/Net/FTP/Common.pm
Installing /usr/share/man/man3/Net::FTP::Common.3pm
Writing /usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/Net/FTP/Common/.packlist
Appending installation info to /usr/lib/perl5/5.6.1/i386-linux/perllocal.pod
[root@limelight Net-FTP-Common-2.9]#