There are two modes for transferring files using the FTP protocol:
- Text (ASCII) is a mode for transferring text files, html documents, php scripts, and so on.
- Binary (binary, bin) is a mode for transferring pictures, executable files, executable cgi scripts, and so on.
For the average user, this is rather useless information, but sometimes it becomes very relevant. For example, if you upload a picture to the server, it turns out to be corrupted and is not shown in the browser, although it is available via the web. This happens when a file with a picture (jpg, gif, bmp, png,..), which is binary, is transferred to the server not in binary, but in text mode. Typically, this occurs due to the FTP program not working properly.
Text files cannot be transferred in binary mode, and binary files cannot be transferred in text mode. In general, FTP programs, by default, must determine for themselves in what mode specific files should be transferred. However, sometimes they make mistakes and the files do not download correctly. In this case, you will have to configure your FTP program so that it correctly transfers the required types of files.