File Transfer Protocol (FTP) in Application Layer (original) (raw)

Last Updated : 11 Jun, 2026

File Transfer Protocol (FTP) is an application-layer protocol that is used to transfer files between a client and a server over a TCP/IP network. It provides a standardized method for file exchange across different systems.

command_channel

FTP

Working and Uses

FTP follows a client–server model and uses two connections:

user

Types of Connection

FTP uses two separate TCP connections to handle communication—one dedicated to control information and another dedicated to actual data transfer. This separation makes FTP an out-of-band protocol.

FTP-Connections

1. Control Connection

This connection is used to exchange commands and responses between the client and server.

2. Data Connection

This is used to transfer the actual file content and directory listings.

FTP Data Types

FTP data types define how file contents are represented and transmitted between the client and server during file transfer.

  1. **ASCII: This data type is used for transferring text files with character encoding based on the ASCII standard.
  2. **EBCDIC: This data type is used for transferring text files encoded in IBM’s Extended Binary Coded Decimal Interchange Code.
  3. **Image (Binary): This data type transfers files as a continuous stream of bytes without any modification.
  4. **Local: This data type is used for transferring files that contain data stored in logical bytes of a specified bit length.

FTP Clients

An FTP client is a software application that enables a user to connect to an FTP server, authenticate, and perform file transfer operations over a network using the client–server model.

Common FTP Commands

These are the three-digit status codes sent by the server to inform the client about the result of a command.

Characteristics

FTP is a connection-oriented file transfer protocol that operates over TCP and supports reliable data transmission.

Types of FTP

There are different ways through which a server and a client do a file transfer using FTP. Some of them are mentioned below:

1. Anonymous FTP

It is a file transfer method that allows users to access publicly available files on a server without requiring a personal user account.

2. Password-Protected FTP

This is a secure access method that requires valid user credentials to access and manage files on an FTP server.

3. FTPS (FTP Secure)

FTPS is an extension of FTP that adds SSL/TLS encryption to secure data transmission between client and server.

4. SFTP (SSH File Transfer Protocol)

This is a secure file transfer protocol that operates over the SSH protocol and provides encrypted communication for file management.

Security Issues

Major Security Weakness

Configuration of FTP Port Numbers

FTP vs SFTP

**FTP **SFTP
Does not provide built-in encryption. Provides encrypted communication.
Operates on Port 21. Operates on Port 22.
Transfers data in plain text. Encrypts both data and credentials.
Uses separate control and data connections. Uses a single secure connection.
Works directly over TCP. Operates over SSH (which runs over TCP).