Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Active and passive are the two modes that FTP can run in.</p> <p>For background, FTP actually uses <em>two</em> channels between client and server, the command and data channels, which are actually <em>separate</em> TCP connections.</p> <p>The command channel is for commands and responses while the data channel is for actually transferring files.</p> <p>This separation of command information and data into separate channels a nifty way of being able to send commands to the server without having to wait for the current data transfer to finish. As per the RFC, this is only mandated for a subset of commands, such as quitting, aborting the current transfer, and getting the status.</p> <hr> <p>In <em>active</em> mode, the client establishes the command channel but the <em>server</em> is responsible for establishing the data channel. This can actually be a problem if, for example, the client machine is protected by firewalls and will not allow unauthorised session requests from external parties.</p> <p>In <em>passive</em> mode, the client establishes <em>both</em> channels. We already know it establishes the command channel in active mode and it does the same here.</p> <p>However, it then requests the server (on the command channel) to start <em>listening</em> on a port (at the servers discretion) rather than trying to establish a connection back to the client.</p> <p>As part of this, the server also returns to the client the port number it has selected to listen on, so that the client knows how to connect to it.</p> <p>Once the client knows that, it can then successfully create the data channel and continue.</p> <p>More details are available in the RFC: <a href="https://www.ietf.org/rfc/rfc959.txt" rel="noreferrer">https://www.ietf.org/rfc/rfc959.txt</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload