Opens in a new tab
3 4 5 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

What is FTP

FTPDefinition:

FTP stands for File Transfer Protocol. It is a network protocol for copying files, listing directories and performing other operations between a client and server over a TCP-based connection.

FTP was designed to exchange files between systems connected to a network and is one of the historic protocols of the Internet. Its main specification appears in RFC 959, although extensions and additional mechanisms were introduced later.

FTP architecture

FTP uses a client-server architecture with two separate connections:

  • FTP client: starts the session and sends commands to authenticate, navigate or transfer files.
  • FTP server: accepts connections, checks permissions and performs authorized operations.
  • Control channel: maintains the session and carries commands and replies; it normally uses port 21 on the server.
  • Data channel: carries directory listings and file contents over a separate connection.

This separation of channels distinguishes FTP from protocols such as HTTP. It does not make one a version of the other: they use different models and commands.

How an FTP transfer works

A typical session can be summarized as follows:

  1. Connection: the client opens the control channel with the server.
  2. Authentication: it sends a username and password or uses anonymous access when the server permits it.
  3. Navigation: it lists directories and changes the working location through protocol commands.
  4. Data mode selection: the client and server agree on how to establish the connection that will carry the content.
  5. Transfer: the client downloads, uploads, renames or deletes files according to its permissions.
  6. Closure: the session ends and the connections used are closed.

FTP supports ASCII and binary transfer modes. ASCII mode can transform text-file line endings between systems; binary mode preserves the bytes and is appropriate for images, executables, compressed files and most current formats.

Active and passive FTP

Active and passive modes determine which party initiates the data connection:

  • Active FTP: the client specifies a port and the server initiates the data connection to it.
  • Passive FTP: the server announces an available port and the client also initiates the data connection.
  • Firewalls and NAT: active mode can be problematic when the client does not accept incoming connections.
  • Common use: passive mode usually works more readily with home networks, firewalls and address translation.

These modes do not encrypt the communication. They only change how the data channel is established.

What FTP is used for

FTP can support manual and automated tasks:

  • Publishing web files: transferring assets to a hosting server when the provider supports the protocol.
  • Distributing files: providing downloads from a repository or server organized into directories.
  • Exchanging large volumes: moving sets of files without relying on email.
  • Maintaining legacy systems: communicating with equipment and processes that still use FTP.
  • Automating transfers: running scheduled uploads or retrievals with scripts and command-line clients.

FTP does not synchronize files by itself like a cloud computing service. An application can compare directories and schedule transfers, but that logic belongs to the client or system using the protocol.

FTP, FTPS and SFTP differences

All three names relate to file transfer, but they do not identify the same protocol:

  • FTP: uses its own control and data channels and, in its original form, does not encrypt credentials or content.
  • FTPS: extends FTP with TLS to protect authentication and transfers. It retains the FTP architecture and commands.
  • SFTP: is a file transfer protocol that operates over SSH. It is not encapsulated FTP or an FTP extension.
  • Compatibility: a server providing FTP or FTPS does not necessarily support SFTP, and the reverse is also true.
  • Ports and configuration: each option requires services, network rules and credentials appropriate to the protocol being used.

Encryption protects content in transit, but it does not replace permission management, server updates or credential protection.

FTP clients and security measures

An FTP client may provide a graphical interface, command-line access, queues and automation. Its configuration should account for:

  • Selected protocol: FTP, FTPS and SFTP must not be configured as though they were interchangeable.
  • Server identity: TLS certificates or SSH keys help verify the destination of the connection.
  • Credentials: individual accounts, strong passwords and limited permissions should be used.
  • Anonymous access: it should only be enabled for resources and operations intended to be public.
  • Logs: authentication and transfer events support investigation of errors or unauthorized access.
  • Network exposure: ports and passive ranges should be limited to what is required.

When compatibility with unencrypted FTP is not required, FTPS or SFTP protect communications against direct reading of credentials and files in transit.