Keep EPSV ALL scoped to its FTP session
06EPSV ALL commits the current session to EPSV for further data-connection setup. A later need for a three-machine transfer requires a new FTP session.
If a three-machine transfer is later needed, start a separate FTP session. The old session remains EPSV-only; the new session has its own setup state.
Key idea: An EPSV-only commitment cannot be undone by quietly falling back to another setup command.
Terms
- FTP
- File Transfer Protocol. Its control connection carries commands; a separate data connection carries a file or directory listing.
- Client / server
- The client sends FTP commands. Which side opens the data TCP connection is a separate choice.
- Address family
- The network protocol number: 1 for IPv4 and 2 for IPv6 in these examples.
- Passive mode
- The server listens for a data TCP connection that the connecting peer opens.
Rules & examples
An EPSV-only commitment cannot be undone by quietly falling back to another setup command.
- After EPSV ALL the server MUST reject data-connection setup commands other than EPSV, including EPRT, PORT and PASV. This is a method restriction in that session, not a claim that every EPSV argument is valid or every later transfer succeeds.
- A client expecting only two-way transfers SHOULD issue EPSV ALL as soon as possible. SHOULD is a recommendation; the separate same-two-machine EPSV usage rule is MUST.
- If a three-way FTP transfer becomes necessary after EPSV ALL, a new FTP session MUST be started. The old session does not need to be depicted as closed; its commitment is not cleared in place.
- The illustration does not prescribe a numeric acknowledgement code for EPSV ALL or a particular rejection code for later disallowed methods. A later ordinary EPSV success uses 229. Authentication, authorization and confidentiality remain separate.
Documentation addresses and chosen listening ports. Each chapter is a separate bounded example; FTP authentication, authorization, file commands and transfer replies are not a complete FTP implementation here. EPRT/EPSV provide no encryption or guaranteed reachability.
Sources
New to this? Start hereA quick picture + helpful background
Commands arrange a separate file connection
Imagine arranging a delivery by phone, then opening a separate delivery entrance. EPSV asks the server to listen; EPRT can describe another receiving endpoint in a proxy setup. The analogy separates arranging a connection from moving the file and does not promise access through a firewall.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.