Content Table

What is FTP server and how does it work?

File Transfer Protocol Server is a computer that provides file storage and access services on the Internet. They provide services in accordance with the FTP protocol. FTP, the file transfer protocol is a set of standard protocols for file transfer on the network, using the client/server model. FTP is a protocol specifically used to transfer files.

FTP is a client/server system. Users use a client that supports the File FTP Protocol connect to a server program on a remote host. The user issues a command on the client, and the remote host server executes the command issued by the user after receiving the command, and returns the execution result to the client. Simply put, the user sends a command to the server, asking the server to send a file to the user. The server responds and sends the file to the client. The user receives the file and places it in the user's working directory. This process is carried out by the FTP server.

How Does FTP Server Work?

FTP is based on the TCP protocol service, which is a file transfer protocol on the Internet. By default, two ports 20 and 21 are used, a data port and a command port, and port 20 is a data port for file transfer between the client and the server data flow. Port 21 is a command port used to transmit control flow and accept related FTP commands and parameters issued by the client.

Raysync ftp server

The FTP client sends a service request to the FTP server in the computer network. The FTP server receives and responds to the FTP client's request and provides the FTP client with the required file transfer service. According to the provisions of the TCP protocol, FTP servers use well-known port numbers 20 and 21 to provide services, and FTP clients use temporary port numbers to send requests. The FTP protocol specifies different well-known port numbers for control connections and data connections, the well-known port number for control connections is 21, and the well-known port number for data connections is 20. The FTP protocol uses a continuous connection communication method, and the maintenance time of the control connection it establishes is usually long.

After explaining the main connection method of the working principle of FTP, then explain the two types of data connection establishment in the working principle of FTP: active mode and passive mode. The active mode of FTP is that the client connects to the well-known port of the FTP server from any unprivileged port, that is, port 21. After receiving the command, the FTP server connects to another temporary port of the client from the data port and returns data; passive mode means that the client opens two arbitrary non-privileged ports to submit commands, and the FTP server passively opens any non-privileged ports to send commands to the client. After the client receives the command, it initiates a connection to the FTP server from the local port to establish a transmission data channel. In this mode, the command connection and the data connection are initiated by the client to solve the problem of the server initiating the connection to the client.

Generally speaking, if we take the server as the criterion. Active mode: The server initiates a connection to the client from port 20. Passive mode: The server passively waits for a client to initiate a connection on a port within a specified range.

The realization goal of FTP is to realize the safe sharing of file data, that is, the computer client can connect to the FTP servers around the world through the FTP client and the Internet to achieve file data sharing and resource sharing. Realize information interaction, that is, other computer clients can access the FTP server built on your computer through the Internet, so that your information can be spread to all parts of the world. Carry out effective data transmission. Files can be exchanged between computers of different types, different systems, and different formats.

Do you know the FTP server now? For related articles, you can click here to learn more.

Enterprise High Speed Large File Transfer Solutions

You might also like

Full List of 5 WinSCP Alternatives [Win/Mac/Linux]

Industry news

August 5, 2024

Explore top WinSCP alternatives for Windows, Mac, and Linux in 2024. Discover 5 WinSCP alternative file transfer solutions.

Read more
What is UDP Protocol and UDP-based Data Transfer Protocol?

Industry news

August 24, 2023

UDP is a connectionless transport layer protocol and part of the TCP/IP protocol suite. UDP is known for its high transfer efficiency and is suitable for data transfer scenarios with high real-time requirements.

Read more
How to Narrow the Transfer Speed Gap in Large File Transfer?

Industry news

September 9, 2020

Raysync is easy to use and has high performance, which can easily solve the problem of TB-level large files and massive small files.

Read more

By continuing to use this site, you agree to the use of cookies.