views:

192

answers:

1

Hi there, For some reason when I try to use get or put from a Solaris box to an IBM mainframe, the ftp client appears to hang.

I've tried all sorts of different variations (for example, including using quotes and not), and all I ever get is a "200 Port Request OK". But I never get the prompt back, and eventually the connection breaks.

    ftp> open ibm.some_server
    Connected to ibm.some_server
    230 USER1 is logged on.  Working directory is "USER1.".
    Remote system type is MVS.

    ftp> cd 'Z.TABS.'
    250 "Z.TABS." is the working directory name prefix.

    ftp> get 'SAMASCPY' samas.txt
    200 Port request OK.

Anyone know what could be going on?

+1  A: 

You need to enable passive mode. With Solaris 10's ftp:

ftp> passive
Passive mode on.

The FTP protocol as originally defined makes the server open a connection back to the client when a file transfer is initiated. That's what the PORT command in your question shows -- the client requested that the server connect back to its address on a specific port number. These days, with ubiquitous firewalls & NAT traversals, that rarely works.

Enabling passive mode tells the client to connect directly to the server, and fixes this issue. Most ftp clients now use passive mode by default; Solaris' does not.

pra