What is FTP and Its Uses
- by Antoniy Yushkevych
- in Networking
- View 5778
File Transfer Protocol (i.e. FTP) has been around for much longer than HTTP (i.e. Hypertext Transfer Protocol), which you are using right now to connect to the Internet. As a matter of fact, it is even older than TCP/IP protocol and over the 40+ years of its existence it has been modified to fit the new standards in the industry.
Since the original specification for FTP was written in 1971, the first FTP clients were completely command-line programs, as they were developed before operating systems adopted the use of GUIs (i.e. Graphical User Interfaces). Nevertheless, nowadays there have been countless GUI FTP clients developed for desktops, servers and even mobile devices.
What is FTP and its uses.
File Transfer Protocol is a standard network protocol used for the transfer of computer files between a client and a server across a computer network. FTP can be used through a command-line interface such as DOS in Windows and Terminal in Linux & MacOS. If that is not your cup of tea, then you can also use one of many FTP clients available online, some even for free. Some browsers also allow you to download files using the protocol. It is possible to transfer any type of file with FTP, and in some cases, it is even faster than HTTP.
In order to login into an FTP server, you will need to enter a username and password, as well as the port number (when logging in using command-line interface). The FTP protocol is handled by ports number 20 and 21 by default. There is also a possibility to access FTP servers anonymously, on which we will elaborate in the following paragraphs.
Most public servers offer you the possibility of login and download files via FTP by connecting anonymously. This does not mean that you are 100% anonymous, but that you use “anonymous” as the username and in most cases, your email address as the password. You do not however need to have an existing account to access the FTP server.
ASCII vs Binary
There are two different forms that file transfers use over FTP: ASCII and binary. ASCII (i.e. American Standard Code for Information Interchange) is a 7-bit character set which contains 128 characters. Any file that is text-based (e.g. HTML, .txt, PostScript files, etc.) is an ASCII file.
On the other hand, we have binary files, which have a different structure and require different types of transfer. These include images, applications, algorithmically generated packages such as .zip and much more.
Nowadays, with an enormous variety of FTP clients available, almost any one of them will automatically detect the transfer mode based on the files you have chosen. As a matter of fact, most clients will run in binary by default, using ASCII only when it is required. They do so because both ASCII and binary files can be transferred through the binary method, however if a binary file is transferred through ASCII, it will be corrupted. There is one small exception to the aforementioned rule. CGI scripts must be transferred through ASCII, as otherwise they will simply not work.
Even though we highly recommend the use of an FTP client, sometimes a web browser might suffice. Once directed to a FTP server, you will have to login and you will be able to browse the server and download the files. Please note that using a browser for FTP offers minimal functionality and has a much greater security risk than an FTP client.