SENDPASV (Specify Whether to send a PASV Subcommand)

FTP client subcommand

To specify whether or not to send a PASV subcommand to the FTP server when doing a data transfer or issuing the DIR and LS subcommands, enter the SENDPASV FTP client subcommand:

SENDPAsv [ 0 | 1 ]

If there is no parameter SENDPASV works like a toggle switch. The SENDPASV value toggles from 1 (ON) to 0 (OFF) or from 0 to 1.

When there is a parameter, the valid values are:

0
Do not send a PASV subcommand.
1
Send a PASV subcommand. This is the default.

iSeries™ default (on) is to send the PASV subcommand. When SENDPASV is off, then the server does not send the PASV subcommand.

Notes:
  1. This subcommand supports RFC 1579, "Firewall-Friendly FTP." Use of the PASV subcommand to establish a data connection is a better method when a data transfer must go through a firewall. In some scenarios, a data transfer through a firewall might not be possible without use of PASV.
  2. Some FTP servers might not support the PASV subcommand. When this is the situation and SENDPASV is ON, then the FTP client will display a message that indicates that the server does not support PASV. The system will attempt to establish the data connection without sending the PASV subcommand.
  3. When SENDPASV is OFF or disabled, then the server sends the PORT subcommand when SENDPORT is ON.
  4. FTP servers that do not support PASV are not compliant with RFC 1123.
Restriction:

When connected to an FTP server through a SOCKS server, you can only use the SENDPASV subcommand before you issue a data transfer subcommand or a list directory subcommand. If you use SENDPASV after one of these subcommands, then the client cannot be able to establish a data connection to the FTP server.

After the client has issued a data transfer or list directory subcommand, then close the connection to the FTP server through a SOCKS server before you issue SENDPASV again.

You can use the SENDPASV subcommand when the FTP client is disconnected from an FTP server.

Related reference
SENDPORT (Specify Whether to Sends a PORT Subcommand)
File Transfer Protocol client syntax conventions
Related information
RFC index search engine
RFC editor