DEV Community

Cover image for Interaction Between FTP Server and client
Zephaniah Joshua
Zephaniah Joshua

Posted on

Interaction Between FTP Server and client

Photo by panumas nikhomkhai from Pexels

The client sends a Passive[PASV] commands to the server which invokes passive modes
The server responds with a 227 code with IP address and port of data socket
Alt Text

The client sends a retrieve[RETR] command plus, the name of the file to be retrieved
If the client is authorised to access the file the server sends a 150 code[request is successful and the file is about to be transferred]
Alt Text

Now to establish the connection to be used connection the client sends an SYC[synchronise] command
The server replies with an acknowledgement and so does the client
Alt Text

The server sends part of the file and the client acknowledges it and this continues until the whole file is received.
Alt Text

Thanks for reading please leave comments of suggestions or contact me @black_strok3

Top comments (0)