Transferring files using FTP

The File Transfer Protocol (FTP) allows a user to copy files from one machine to another. The protocol allows for data transfer between the client (the user) and the server in either direction. In addition to copying files, the client can issue FTP commands to the server to manipulate the underlying file system of the server (for example, to create or delete directories, delete files, rename existing files, and so on.) FTP is the most common TCP/IP application for moving files between computers.

Copying files from one machine to another is one of the most frequently used operations. The data transfer between client and server can be in either direction. The client can send a file to the server machine. It can also request a file from this server.

To access remote files, the user must identify himself or herself to the server. At this point the server is responsible for authenticating the client before it allows the file transfer.

From an FTP user's point of view, the link is connection-oriented. FTP uses TCP as a transport protocol to provide reliable end-to-end connections. Both hosts must run TCP/IP to establish file transfer.

The z/OS® model for the FTP server includes a daemon process and a server process. The daemon process starts when you start your cataloged procedure (for example, START FTPD) and it listens for connection requests on a specific port. The port is the well-known port 21 unless otherwise specified. For methods of choosing a different port number, see Configuring ETC.SERVICES and Configuring the FTPD cataloged procedure. When the daemon accepts an incoming connection, it creates a new process (server's address space) for the FTP server, which handles the connection for the rest of the FTP login session. Each login session has its own server process.

The server process inherits the accepted connection from the daemon process. This connection is called the control connection. The server receives commands from the client and sends replies to the client using the control connection. The control connection port is the same as the daemon's listening port.

The client and server use a different connection for transferring data; this connection is called the data connection. By default, the data port is one less than the control connection port. For example, if the control connection port is 21, the data port is 20. An FTP client can override the default data port by directing the server to run in passive mode. In passive mode, the server uses an ephemeral port for the data port. Passive mode is requested by firewall friendly clients and by clients initiating three-way data transfers.

Notes:
  1. This topic discusses RACF® configuration required for FTP. References to RACF apply to any other SAF-compliant security products that contain the required support. If you are using another security product, read the documentation for that product for instructions on configuration.
  2. If you use the environment variable _BPX_JOBNAME when you start FTPD, the server's address space is known as the job name specified in the _BPX_JOBNAME variable. You might need to have a common naming convention for your installation's FTP address spaces if your installation uses syslogd isolation or has other workload management requirements.

    If you do not use the _BPX_JOBNAME environment variable, the server's address space assumes the name of the user. For example, if a user logs into an FTP server with the user ID TCP0001, the FTP server address space servicing the request is also known as TCP0001.

    If the FTP daemon accepts a connection that is protected by the TLS security mechanism and you are not using the _BPX_JOBNAME environment variable, the server's address space name is a name derived from the FTP server job name. The name is in the form jobnamex, where the jobname value is the job name, and the x value is a number in the range 1 – 9. If the FTP daemon accepts a connection that is protected by the TLS security mechanism and you are using the _BPX_JOBNAME environment variable, the server's address space name is a name derived from the _BPX_JOBNAME environment variable. The name is in the form bpxjobnamex, where the bpxjobname value is the value specified for the _BPX_JOBNAME environment variable, and the x value is a number in the range 1-9.