How to solve the problem of "227 Entering Passive Mode" during FTP connection

Source: Internet
Author: User
Tags ftp connection

Yesterday, the "227 Entering Passive Mode" error was prompted when I connected the ftp server configured on a Windows server. Next I will introduce the solution to this problem.

Two FTP service modes:

• Port mode (active mode). connection process: the client sends a connection request to the FTP port of the server (default value: 21). The server accepts the connection and establishes a command link. When data needs to be transmitted, the client uses the PORT command on the command link to tell the server: "I opened the *** PORT X and you came to connect to me ". Therefore, the server sends a connection request from Port 20 to port *** X of the client and establishes a data link to transmit data.
• Pasv mode (passive mode). connection process: the client sends a connection request to the FTP port of the server (21 by default). The server accepts the connection and establishes a command link. When data needs to be transmitted, the server uses the PASV command on the command link to tell the client: "I opened port *** X and you came to connect to me ". Therefore, the client sends a connection request to the *** port X of the server and establishes a data link to transmit data.
Because FTP on the server performs TCP/IP filtering and only allows specific ports to be connected by clients, PASV cannot be used. After finding the cause, the solution is simple. You only need to disable the PASV method of the client and force the PORT method to access the server.

After the client logs on to the FTP server, use the passive command to disable the PASV method of the client, as shown below:

The Code is as follows: Copy code

Ftp> passive

Passive mode off.

Execute this command again to enable PASV mode.

Related Article

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.