FTP Active Passive Mode configuration confusion causes unable to log on

Source: Internet
Author: User
Tags ftp ftp site

Phenomenon: User feedback FTP can not login, ssh Landing is normal, when landing FTP prompts error: Connection accept sent data confirmation failed, new FTP site also prompted error: Server-side interface exception, FTP site add failed.

1. Solution 1

Analysis Process and solution: We look at the machine after the confirmation is/etc/vsftpd/vsftpd.conf, user active mode and passive mode Setup error caused.

In the/etc/vsftpd/vsftpd.conf file, the user's source file is like this:

Listen=yes

Anonymous_enable=no

Use_localtime=yes

Local_enable=yes

Write_enable=yes

local_umask=022

Dirmessage_enable=no

Xferlog_enable=yes

Connect_from_port_20=yes

Xferlog_file=/var/log/vsftpd.log

Xferlog_std_format=no

idle_session_timeout=180

data_connection_timeout=120

Ascii_upload_enable=yes

Ascii_download_enable=yes

Ftpd_banner=welcome to www.net.cn FTP service.

Chroot_list_enable=yes

Chroot_list_file=/etc/ftpchroot

Ls_recurse_enable=yes

Pam_service_name=vsftpd

Userlist_enable=yes

Log_ftp_protocol=yes

Max_per_ip=3

Pasv_enable=yes

pasv_max_port=30000

pasv_min_port=30000

To set an error cause analysis:

In the above/etc/vsftpd/vsftpd.conf file Connect_from_port_20=yes is the meaning of enabling the default 20 port listener when active mode is turned on

Pasv_enable=yes

pasv_max_port=30000

pasv_min_port=30000 This is set in passive mode

The passive mode is correctly set to:

Pasv_enable=yes Open Passive Mode

pasv_min_port=%number% Passive mode lowest port

pasv_max_port=%number% Passive mode highest port

The lowest and highest ports in the user's passive mode are 30000, and all pasv_max_port=30000 pasv_min_port=30000 are misconfigured.

2. Solution:

1) We will connect_from_port_20=yes the comment of the active mode of this statement out

2) Modify Passive mode configuration

Pasv_enable=yes

pasv_max_port=30000

pasv_min_port=30000

To

Pasv_enable=yes

pasv_max_port=30000

pasv_min_port=25000

3 Restart Vsftp can be logged in.

3. For FTP active mode and passive mode settings can refer to http://zhidao.baidu.com/question/279862735.html

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.