vsftpd 421 Service not available, remote server has closed connection

 $ ftp quwenqing.com
Connected to quwenqing.com (x.x.x.x).
220 (vsFTPd 2.0.5)
Name (quwenqing.com:test):
530 Please login with USER and PASS.
SSL not available
331 Please specify the password.
230 Login successful.
421 Service not available, remote server has closed connection
ftp> quit

近期将CentOS升级到5.5,又想起这问题,潜心google了一下,发现这个问题已经做为bug提交过,解决方案是配置   connect_from_port_20=YES ,一试,果然一切OK。

Description of problem:

When specific options are set in the configuration file, vsftpd prematurely
closes connection. This is caused by a parent process of process (child)
responsible for handling post-auth commands and a patch which influence
behaviour of the child.

The parent process (responsible for e.g. binding to port 20 in active mode)
tries to drop privileges, but due to specific config options (mentioned bellow)
it does terminate (calls exit()). The following patch:


backports some new code from the upstream (one of changes between 2.0.7 and
2.1.0), which is responsible for sending termination signal to child when its
parent die, it means it also terminates the child (which handles post-auth

The bug occurs only when the following options have the exact values:


Version-Release number of selected component (if applicable):

RHEL5 (vsftpd-2_0_5-16_el5)

Additional info:

the attached patch solves the issue

This bug is time dependent, it depends on context switching, so that if parrent
calls exit() before child calls vsf_set_die_if_parent_dies(), it works.   

引用通告地址: 点击获取引用地址
标签: vsftpd
评论: 2 | 引用: 0 | 阅读: 15305
  • 1 
daoyongyu [ 2014-09-29 18:49 | 回复 | 编辑/删除 ]
421 Service not available, remote server has closed connection
Login failed.
eeee [ 回复于2018-02-27 15:30 网址 | 编辑/删除 ]
  • 1 
昵 称(*): 密 码:
网 址: 邮 箱:
验证码(*): 验证码图片 选 项:
头 像:
内 容(*):