PORTCOMMAND (FTP server) statement

Use the PORTCOMMAND statement to specify whether the PORT command is accepted or rejected. If REJECT is coded, this limits the use of commands such as GET, PUT, MPUT, MGET, and APPEND in PROXY mode. If not in PROXY mode, and REJECT is coded, the FTP server uses the same ephemeral port for the data connection that is used for the control connection. When issuing multiple commands that use the data connection, delays can occur.

Syntax

Read syntax diagramSkip visual syntax diagram
   .-PORTCOMMAND ACCEPT------.   
>>-+-------------------------+---------------------------------><
   '-PORTCOMMAND--+-ACCEPT-+-'   
                  '-REJECT-'     

Parameters

ACCEPT
The PORT and EPRT commands are accepted by the server.
REJECT
The PORT and EPRT commands are rejected by the server.

When PORTCOMMAND is set to REJECT, all PORT and EPRT commands are rejected. PORTCOMMANDPORT and PORTCOMMANDIPADDR settings are disregarded.

Examples

Setting the server to reject all PORT and EPRT commands is shown in the following example:
PORTCOMMAND REJECT

Related topics