Join Scott Simpson for an in-depth discussion in this video What is FTP?, part of Learning FTP.
- FTP, or File Transfer Protocol, is a popular way of sending and receiving, or uploading and downloading files across a network between a client and a server. FTP has been around since 1971 and it's still pretty widely used today. Many web hosts offer FTP servers for customers to upload and download files for their personal websites. Many companies have FTP servers which host or provide software update files, drivers, and the like.
FTP servers for open source projects are common too. Many Linux distributions have a wide network of FTP sites which they call mirrors because they all contain the same information where installation disc images can be downloaded. Some companies also offer FTP servers as a place where outside parties such as customers and vendors can upload or send files. Though for security reasons, this is usually discouraged outside of a network firewall. FTP servers can require a username and password to log in or they can be configured to allow anonymous access It's most common to use a FTP server to which someone else has given you access.
In that case, someone will have set up your credentials or log in information. They may have provided it to you in an email or other message or you might need to go retrieve it from a web host's management system. It's important to know that these credentials are sent in plain text meaning that anyone watching traffic on the network can discover what they are. For this reason, it's usually a good idea to set up account credentials that are only used for FTP access and aren't the same as a user or administrator's regular username and password.
There are a few ways to better secure the FTP connection, namely FTP-SSL and SFTP, but I'll discuss those later in the course. You might see the information for an FTP connection written out like this. The ftp:// represents the protocol much like http:// represents Hypertext transfer protocol for websites. The username and password can be specified in the URL, separated by a colon, and preceding an @ sign or they can be omitted.
Usually, a server will prompt for credentials if they're omitted in the initial connection. Next, comes the server's address: an IP address, a hostname, if you're on a local network, or a fully qualified domain name. After that, there's an option to specify a port. FTP usually listens for commands on TCP port 21, but that can be changed to avoid conflicts with other servers on the same host. The client and server will open other ports for data transfer automatically if the firewall allows.
Following the server and port, you can add a directory path and a file name. Of course, this notation is only useful if you know exactly what file you want to get at and where it's located. This notation behaves like a hyperlink. If you click it, usually it'll open up in a browser window. FTP also allows browsing through folders using a client application. We'll take a look at one of those later in the course. FTP was designed to send data from the server to the client in response to a request from the client which is referred to as Active mode.
But with a growing popularity of NAT, or Network Address Translation, on home and business networks, this often doesn't work anymore. To get around the limitation, most of the time you'll use Passive mode, where the client sets up and controls the connection instead of the server. There are also a few different modes for transferring files. The most common you'll see are text, or ASCII, which sends files as ASCII characters. and binary which treats the files as being transferred as a series of bytes.
Of course, text mode should only be used for sending plain text information. But usually you won't need to worry about this. Most FTP clients have an Automatic mode that makes the choice for you. If many people access the FTP server, they may have their own Home folders, or private spaces, separated from the Home folders of others. An FTP server will often direct users logging in to their home folder though user home folders can also be set to a shared location. On a web host, your home folder is often set up to be a folder named after your account.
Okay, that's enough background. Let's move on to actually connecting to an FTP server.