9. Application layer protocols

9.5. FTP protocol

A popular web service is the ability to send and receive files via FTP (File Transfer Protocol). The service is also a communication protocol when we want to upload website files to a web server or simply want to upload some files to a server and share them with other users. To perform the operation of uploading files to the server or downloading resources from the server, we need to use an FTP client and such a service must also be running on the server. FTP clients are available on every operating system, for example via the command line.

If you only use FTP for downloading files, you can do so safely using a web browser. Most, if not all, popular browsers have built-in FTP clients.

However, if you want to upload files to a server, it is advisable to use dedicated software such as FileZilla or WinSCP - these are free and can be downloaded from the web.

WinSCP FTP client

With this protocol, two connections must be established between the client and the server in order to communicate properly. The first connection is only used to send commands and messages and is called a control connection (it runs on port 21), while the second connection runs on port 20 and is used to transfer files to and from the server. To protect access to the FTP server, user authentication is used, which is the same as for logging in to profiles or emails on social networks, but sometimes, when the resource is available to a larger audience, anonymous access is granted to users, therefore no authorisation is required. This solution should only be used if the user is allowed to download data from the server. Uploading files, i.e. placing them on the server, is always only accessible to users with a login and password.