We can make a distinction between active and passive FTP. In the active version, the client establishes the connection using Port 21, as described above, and tells the server which port can be used to deliver its answers. However, if the client is protected by a firewall then the server cannot send any answers, since all external connections are blocked. That’s why passive mode was developed. This way, the server can send a port number to the client that the client can then use to establish a data channel. Since the client initiates the connection themselves, their firewall cannot block the transfer.
The File Transfer Protocol knows various commands and status codes. With the 32 commands – not all of which are always implemented on the server – the client instructs the server to upload or download files, organize directories, or delete files. The server answers with a status code that provides information on whether the command was successfully implemented.
As usual, you’ll need access information in order to use FTP with a server. But some servers also offer anonymous FTP, with which any user can transfer files to the server using FTP or download from it without a password. Since these open FTP servers are vulnerable to security risks, the possibilities for users are usually rather limited.