rfc-2389

Feature negotiation mechanism for the File Transfer Protocol

P. Hethmon, R. Elz
date1998-08 streamIETF areaapp wgftpext statusPROPOSED STANDARD pages9 canonicalhttps://www.rfc-editor.org/rfc/rfc2389 doi10.17487/RFC2389
This document provides a mechanism by which clients of the FTP protocol can discover which new features are supported by a particular FTP server. [STANDARDS-TRACK]

Extracted elements (21)

design-rationale §3.2

Each feature line in a FEAT response is required to begin with a single space that is not optional and does not indicate general whitespace. This space guarantees the feature line can never be misinterpreted as the `211 End` terminator.

design-rationale §3.3

FEAT was designed to reduce unnecessary traffic between user-PI and server-PI as more extensions are introduced. Without FEAT, a client would have to probe each extension in turn, which may be wasteful and may have undesired side effects from issuing commands merely to test support.

design-rationale §3.2

The FEAT command itself is not included in the list of returned features; support for FEAT is indicated by returning any reply other than 500 or 502. Similarly, OPTS is not listed because it is mandatory whenever FEAT is implemented.

interoperability-note §3.2

Feature-label and feature-parms are nominally case sensitive, but definitions of specific labels will usually specify them in a case-independent manner; implementations are recommended to use upper case when transmitting the feature response.

interoperability-note §3.2

Several FTP extensions were developed and in widespread use prior to the adoption of FEAT. An error response to FEAT does not necessarily mean those pre-existing extensions are unsupported; user-PIs should test for such extensions individually when FEAT returns an error.

interoperability-note §4

Where no OPTS behavior is defined for a particular FTP command, there are no options available for that command; neither "OPTS FEAT" nor "OPTS OPTS" are valid because neither command has optional functionality.

normative-requirement §4 SHOULD

A 451 reply SHOULD be sent for OPTS when a temporary server condition prevents acceptance of the command but where the command might succeed if repeated later under changed conditions.

normative-requirement §4 MUST

An opts-good 200 reply MUST be sent when the command-name in OPTS is recognized and the command-options (if any) are recognized and appropriate.

normative-requirement §3.2 MUST

FTP implementations that support FEAT MUST include in the FEAT response all properly documented FTP extensions beyond RFC 959, including those that existed before FEAT. A client receiving a FEAT response may assume the listed extensions are the only ones supported.

normative-requirement §3.2 MUST

Replies to the FEAT command MUST comply with the specified ABNF syntax; the format of feature lines is precisely defined and MUST be exactly as specified.

normative-requirement §3.2 SHOULD

Servers that recognize FEAT but have no extended features to report SHOULD respond with the "no-features" 211 reply, though a 500 or 502 reply MAY also be used since the cases are practically indistinguishable.

normative-requirement §3.2 MUST NOT

The "no-features" 211 reply MUST NOT use the multi-line response format; exactly one response line is required and permitted when the server supports FEAT but implements no extended features.

normative-requirement §4 MUST

The OPTS command MUST be implemented whenever the FEAT command is implemented. Because of this coupling, OPTS is not listed in the FEAT response.

normative-requirement §3 MUST

User-FTP PIs MUST expect to see unknown features in FEAT command responses; encountering an unlisted feature is not an error and simply indicates the server has implemented a new specification unknown to the client.

protocol-element §3

The FEAT command requests the server to list all extension commands and extended mechanisms it supports beyond those defined in RFC 959. It has no parameters or arguments.

protocol-element §4

The OPTS command allows a user-PI to specify the desired behavior of a server-FTP process when a target FTP command is later issued. The exact behavior and syntax vary with the target command.

security-consideration §5

No significant new security issues beyond those already in FTP are introduced by this extension. The FEAT command does allow users to enumerate server capabilities, but the same information could be obtained by probing commands; this capability-disclosure risk is not considered a serious threat warranting remedial action.

security

security-consideration §5

The security implications of any additional features reported by FEAT or manipulated by OPTS should be addressed in the specifications that define those individual features, not in this document.

security

wire-format §3.1

FEAT command syntax is simply `feat = "Feat" CRLF` with no parameters. FEAT response uses a 211 multi-line format where each feature line begins with a mandatory single space, and the listing terminates with `211 End CRLF`.

wire-format §4

OPTS command syntax: `opts = opts-cmd SP command-name [SP command-options] CRLF`. Response is either `opts-good = "200" SP response-message CRLF` or `opts-bad = "451" / "501" SP response-message CRLF`.

wire-format §3.2

The FEAT response ABNF: `feature-listing = "211-" *TCHAR CRLF / 1*(SP feature CRLF) / "211 End" CRLF`. Each feature line is `feature = feature-label [SP feature-parms]` where feature-label is 1*VCHAR and feature-parms is 1*TCHAR.