Build an efficient FTP server in Linux (1)

Source: Internet
Author: User
Tags ftp file ftp client file transfer protocol ftp file transfer ftp file transfer protocol ftp protocol

Among many network applications, FTP File Transfer Protocol has a very important position. Software resources are a very important resource in the Internet, and most of the various software resources are stored on the FTP server. Like most Internet services, FTP is also a client/server system. You can use a client program that supports the FTP protocol to connect to the FTP server program on the host. The user sends commands to the server program through the client program. The server program executes the commands issued by the user and returns the execution results to the client.

The FTP service can be divided into two types based on different service objects: The system FTP Server can only be used by legal users on the system; the Anonymous FTP Server) allow anyone to log on to the FTP server to obtain files.

The FTP data transmission mode is divided into three modes for FTP data connection: Active Transmission Mode, passive transmission mode, and single-port transmission mode.

1. Active Transmission Mode

When the FTP control connection is established and the customer proposes a directory list and transfers files, the client issues The PORT command to negotiate with the server, the FTP server uses a standard Port 20 as the server's data connection port ftp-data) to establish a data connection with the customer. Port 20 is only used to connect the source address to the server, and Port 20 does not listen to the process to listen to customer requests.

In active transmission mode, the FTP data connection and control connection are in the opposite direction. The server initiates a connection for data transmission to the client. The client connection port is determined by the server and the client through negotiation.

2. Passive Transmission Mode

When the FTP control connection is established and the customer proposes a directory list and transfers files, the client sends the PASV command to make the server in passive transmission mode, and the FTP server waits for the customer to contact it. The FTP server listens to customer requests on other non-20 data transmission ports.

In passive transmission mode, the FTP data connection and the control connection direction are the same, and the client initiates a connection for data transmission to the server. The client connection port is the port used to initiate the data connection request. When an FTP client accesses an FTP server outside the firewall, it must use the passive transmission mode.

3. Single Port Mode

In addition to the above two modes, there is also a single port mode. Data connection requests in this mode are initiated by the FTP server. When this transmission mode is used, the control connection port of the client is the same as the data connection port. This mode is not commonly used because it cannot input data or transmit commands continuously in a short period of time.

There are many available FTP servers in Linux, among which WU-FTPWashington University FTP is popular) and VSFTP. Red Hat 8.0 comes with both WU-FTP and VSFTP software. WU-FTP is a famous FTP server software, which is powerful and can run well in many Unix operating systems. However, VSFTP is becoming more and more popular as a rising star, and only VSFTP is available in Red Hat 9.0 release.

In VSFTP, VS indicates "Very Secure ". From the name, we can see that from the very beginning, software writers have paid great attention to their security. In addition to inherent security, VSFTP also features high-speed and stable performance. In terms of stability, VSFTP can be deployed on a single machine rather than a cluster. more than 4000 concurrent users can be connected simultaneously. According to ftp.redhat.com, VSFTP supports up to 15000 concurrent users.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.