Workaround for "227 Entering Passive Mode" appears when FTP is connected

Source: Internet
Author: User

Today from the public network server connection to the Local intranet FTP server copy file, the system always prompt 227 Entering Passive Mode (xxx,xxx,,xxx,xxx,x), it is very strange, so the Internet to find information carefully studied a bit, The original FTP has two modes of operation, port mode and PASV mode, the Chinese meaning is active and passive, the details are as follows:

Active FTP:
Command connection: client >1024 port → Server 21 port
Data connection: Client >1024 port ← Server 20 Port

Passive FTP:
Command connection: client >1024 port → Server 21 port
Data connection: Client >1024 port ← Server >1024 Port

The port (Active) connection process is: The client sends a connection request to the server's FTP port (by default, 21), the server accepts the connection, and establishes a command link. When the data needs to be transferred, the client tells the server with the Port command on the command link: "I opened the ***x port and you came over to connect me." The server then sends a connection request from Port 20 to the client's ***x port, creating a data link to transmit the data.

The PASV (passive) connection process is: The client sends a connection request to the server's FTP port (by default, 21), the server accepts the connection, and establishes a command link. When the data needs to be transferred, the server tells the client on the command link with the PASV command: "I opened the ***x port and you came over to connect me." The client then sends a connection request to the server's ***x port and establishes a data link to transmit the data.

Because my local FTP server is in the network, just mapped two ports from the external network (20,21), so the PASV method can not be used, the solution to this problem is very simple, the PASV way to turn off the client, forcing it to access the server port mode, After logging in to the FTP server, use the passive command to turn off the client's PASV mode, as follows:

ftp> Passive
Passive mode off.

ftp> Passive (Run command again to open)

Passive mode on.

Come from:http://www.cnblogs.com/nssa/archive/2011/11/11/2245408.html

Workaround for "227 Entering Passive Mode" appears when FTP is connected

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.