FTP File Transfer Protocol: What It Is and How It Works
In this article
FTP (File Transfer Protocol) is a standard network protocol used to transfer files between a client and a server over a TCP/IP network, such as the internet. It was designed in 1971 and formalized in 1985 (RFC 959) to provide a reliable, platform-independent way to upload, download, and manage files on remote systems. In plain terms, FTP lets you move files from your computer to a web server or another computer, and vice versa, using a dedicated FTP client or a web browser. While it remains widely used for website maintenance and large file transfers, it has a major security flaw: all data, including usernames and passwords, is sent in plain text, making it vulnerable to interception. For secure transfers, you should use FTPS (FTP over SSL/TLS) or SFTP (SSH File Transfer Protocol), which encrypt the connection.
Background and History of FTP
FTP predates the modern internet. It was first proposed in 1971 by Abhay Bhushan as part of the early ARPANET efforts, and the current specification (RFC 959) was published in 1985. The protocol was designed to solve a simple problem: how to reliably transfer files between different computer systems that might run different operating systems and use different file formats. FTP establishes two separate connections: a control connection (port 21) for commands and a data connection (port 20 or a dynamic port) for the actual file data. This separation allows the client to send commands (like LIST, RETR, STOR) while the server responds with status codes (like 200 OK, 550 File Not Found). Over the decades, FTP became the de facto standard for uploading files to web servers, sharing large files within organizations, and distributing software. However, because it sends credentials and data in plain text, it is now considered obsolete for most internet-facing uses, replaced by encrypted alternatives.
How FTP Works: The Technical Basics
FTP operates on a client-server model. The client (your computer or an FTP client app) initiates a connection to the server (the remote machine hosting the files). Here’s the step-by-step process:
- Establish control connection: The client connects to the server’s port 21 using TCP. This connection stays open for the entire session and carries commands like USER, PASS, and CWD (change directory).
- Authenticate: The client sends a username and password. If the server allows anonymous access, you can use “anonymous” as the username and your email as the password (though many servers now disable this).
- Open data connection: The server opens a separate data connection (port 20 in active mode, or a random port in passive mode) to transfer the actual file contents. Passive mode (PASV) is more common today because it works better with firewalls and NAT.
- Send commands and transfer files: The client sends commands like RETR (download), STOR (upload), LIST (list files), and DELE (delete). The server responds with status codes and transfers the data.
- Close connection: When done, the client sends QUIT, and both connections close.
FTP supports two modes: active and passive. In active mode, the server initiates the data connection back to the client, which often fails behind firewalls. In passive mode, the client initiates both connections, which is why most modern FTP clients default to passive mode.
FTP vs. FTPS vs. SFTP: Which Should You Use?
This is the most common confusion. FTP, FTPS, and SFTP are three different protocols, though they share the “FTP” name.
- FTP (plain): Unencrypted. Everything—including your password—is sent in clear text. Any network sniffer can capture it. Use only on trusted local networks or for anonymous public downloads.
- FTPS (FTP Secure): This is FTP wrapped in SSL/TLS encryption. It uses the same commands and ports (21 for control, and a secure data connection). It’s often called “FTP over SSL.” It’s compatible with most FTP clients but requires the server to have an SSL certificate.
- SFTP (SSH File Transfer Protocol): This is not FTP at all—it’s a file transfer subsystem of the SSH protocol. It runs on port 22 (or another port) and uses SSH encryption. It’s more secure than FTPS because it encrypts both commands and data, and it also supports secure file management operations. However, it’s not compatible with plain FTP servers; the server must run an SSH server.
For any internet-facing transfer, use SFTP if your host supports it, or FTPS if not. Plain FTP should be reserved for local networks where you control the security.
How to Choose an FTP Client and Server
You need two pieces of software: an FTP client (on your computer) and an FTP server (on the remote machine). For a home user uploading files to a web host, the client is what you install. For setting up your own server, you’ll need server software.
FTP clients (free options):
- FileZilla (Windows, macOS, Linux) – supports FTP, FTPS, and SFTP.
- WinSCP (Windows) – primarily SFTP, but also FTPS and FTP.
- Cyberduck (macOS, Windows) – supports FTP, FTPS, SFTP, and cloud storage.
- Built-in command-line
ftpclient (Windows, macOS, Linux) – for basic use, but lacks modern features.
FTP servers:
- FileZilla Server (Windows) – free, supports FTPS.
- ProFTPD or vsftpd (Linux) – open-source, widely used.
- OpenSSH (for SFTP) – built into most Linux servers and macOS.
When choosing, consider: does the client support SFTP? Does the server allow you to set up FTPS? For most home users, the simplest path is to use your web host’s provided FTP credentials and a client like FileZilla, which automatically defaults to FTPS if available.
Common FTP Problems and How to Fix Them
FTP issues are usually connection-related. Here are the most frequent problems and their fixes:
- Connection timed out: The server might be down, or your firewall is blocking port 21. Try pinging the server, then check your firewall settings. Also, ensure you’re using the correct hostname and port.
- “530 Login incorrect”: Wrong username or password. Double-check with your host, and ensure you’re not using a web browser URL (which might append extra characters).
- “425 Can’t open data connection”: This is usually a passive/active mode mismatch. In your client, switch to passive mode (or active, if you’re on a local network). Most clients have a setting for this.
- “550 Permission denied”: You don’t have write permission to the target directory. Check the folder permissions on the server, or contact your host.
- Transfer stalls at 99%: Often a firewall or NAT issue with the data connection. Try switching to passive mode, or use a different data port range.
If you’re still stuck, try a different client or restart your router. Also, check if your ISP blocks FTP ports (some do). If so, use SFTP on port 22 instead.
Security Risks of FTP and Safe Alternatives
The biggest risk of plain FTP is that your login credentials and files are transmitted without encryption. On a public Wi-Fi network, an attacker can easily capture your password using packet-sniffing tools. Even on a wired network, any compromised router or switch could expose the data. Additionally, FTP servers can be vulnerable to bounce attacks (where a malicious user tricks the server into connecting to arbitrary ports) and brute-force attacks on passwords.
To stay safe:
- Never use plain FTP over the internet for anything sensitive. Use FTPS or SFTP.
- If you must use plain FTP (e.g., for a legacy device), do it only on a private, trusted LAN.
- Use strong, unique passwords and enable two-factor authentication if your server supports it.
- Keep your FTP server software updated to patch known vulnerabilities.
- Consider using a VPN to encrypt all traffic even when using FTP on a local network.
For home users, the simplest secure alternative is to use your web host’s file manager (via HTTPS) or a cloud storage service like Dropbox or Google Drive, which handle encryption automatically. If you need to transfer files between your own devices, use SFTP (if you have SSH access) or a tool like Resilio Sync.
If That Didn’t Work: Advanced Troubleshooting
If basic fixes fail, try these steps in order:
- Check the server’s status page: Many hosts have a status page showing if FTP is down for maintenance.
- Update your FTP client: Old clients may have bugs or lack support for newer TLS versions.
- Try a different network: If you’re on a corporate or public network, a firewall might be blocking FTP. Test from a mobile hotspot.
- Check your router’s NAT settings: If you’re running an FTP server at home, you need to forward port 21 and the passive data port range. This is a router configuration—if you’re not comfortable with it, consult your router’s manual or your ISP.
- Reset your FTP password: Sometimes the server’s password hash gets corrupted. Reset it via your hosting control panel.
- Contact your host: If nothing works, the issue is likely on the server side. Provide them with the exact error message and your client’s log.
Frequently Asked Questions
Is FTP still used in 2025?
Yes, FTP is still used, but mainly for legacy systems, internal networks, or anonymous public downloads. Most modern web hosting and file sharing has moved to SFTP, FTPS, or cloud storage. However, many devices like IP cameras and NAS boxes still offer FTP for setup or data transfer.
Can I use FTP in a web browser?
Yes, you can type ftp://username:password@host in a browser, but support is limited. Most browsers (Chrome, Firefox, Edge) have removed FTP support entirely. For any real work, use a dedicated FTP client.
What is the difference between FTP and HTTP?
FTP is designed for file transfer with full management (upload, delete, rename), while HTTP is for viewing web pages. HTTP can download files, but it doesn’t support uploading to a server in the same way. FTP also maintains a persistent connection and supports resuming interrupted transfers.
How do I know if my host supports SFTP?
Check your hosting control panel (like cPanel) for “SSH Access” or “SFTP” settings. Most shared hosts offer SFTP via port 22. If you’re unsure, contact support. If they only offer FTP, ask if they can enable FTPS.
Can FTP transfer resume after an interruption?
Yes, FTP supports resuming via the REST command, but not all clients and servers implement it. FileZilla and WinSCP both support resuming, but the server must also support it. If you have a flaky connection, SFTP over SSH is often more reliable for resuming.