SENDPASV (Specify whether to send a PASV Subcommand)

The SENDPASV IBM® i FTP client subcommand specifies whether to send a PASV subcommand to the FTP server when you transfer data or issue the DIR and LS subcommands.

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.

The default (on) is to send the PASV subcommand. When SENDPASV is off, the FTP client 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, the FTP client 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 is not able to establish a data connection to the FTP server.

After the client has issued a data transfer or list directory subcommand, 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.