in reply to Net::FTP port inconsistencies

FTP uses port 20 as its data port, per default. That is, the client should listen on port 20, for the server to send data to. The passive command asks the server to designate a data port, and listen on it, which the client then connects to. (The point being that sometimes the client is behind a firewall or isnt allowed to open ports for listening). See section 3.3 of the RFC.

If you are using passive (PASV), then neither is using port 20. Possibly the IIS server has problems with passive mode? (Would be odd though) .. Try adding DEBUG => 1 to your ->new call, and gve us the results?

C.

Replies are listed 'Best First'.
Re^2: Net::FTP port inconsistencies
by Anonymous Monk on Feb 24, 2005 at 16:38 UTC
    Hi castaway,
    Sorry about delay in replying but have been away from desk for a few days

    Changed "DEBUG => 1" as you suggested and the message returned is below: (sorry about all asterisks - i'm a bit paranoid about putting too many details on internet)

    Net::FTP>>> Net::FTP(2.75) Net::FTP>>> Exporter(5.562) Net::FTP>>> Net::Cmd(2.26) Net::FTP>>> IO::Socket::INET(1.25) Net::FTP>>> IO::Socket(1.26) Net::FTP>>> IO::Handle(1.21) Net::FTP=GLOB(0x93767e4)<<< 220 eyesp05 Microsoft FTP Service (Version + 5.0). Net::FTP=GLOB(0x93767e4)>>> user ******** Net::FTP=GLOB(0x93767e4)<<< 331 Password required for ********. Net::FTP=GLOB(0x93767e4)>>> PASS .... Net::FTP=GLOB(0x93767e4)<<< 230 User ******** logged in. Net::FTP=GLOB(0x93767e4)>>> MKD /********************** Net::FTP=GLOB(0x93767e4)<<< 550 /**********************: Cannot create + a file when that file already exists. Net::FTP=GLOB(0x93767e4)>>> CWD /********************** Net::FTP=GLOB(0x93767e4)<<< 250 CWD command successful. Net::FTP=GLOB(0x93767e4)>>> ALLO 13517 Net::FTP=GLOB(0x93767e4)<<< 200 ALLO command successful. Net::FTP=GLOB(0x93767e4)>>> PASV Net::FTP=GLOB(0x93767e4)<<< 227 Entering Passive Mode (**,***,***,***, +13,206). Net::FTP=GLOB(0x93767e4)>>> STOR test20050216b.asp Net::FTP=GLOB(0x93767e4)<<< 425 Can't open data connection.