VSFTPD错误,连接尝试超时

问题描述 投票:-3回答:1

我在CentOS 7上的VSFTPD服务器有问题,我无法检索目录列表。闲置120秒后,连接超时。

来自客户端的日志如下。

Status: Connecting to 64.190.204.82:21... Status:   Connection established, waiting for welcome message... Status:  Insecure server, it does not support FTP over TLS. Status:  Logged in Status:   Retrieving directory listing... Command:    PWD Response:   257 "/home/bahjat" Command: TYPE I Response:    200 Switching to Binary mode. Command:  PASV Response:  227 Entering Passive Mode (64,190,204,82,233,225). Command: LIST Error: The data connection could not be established: ETIMEDOUT - Connection attempt timed out Error:   Connection timed out after 120 seconds of inactivity Error: Failed to retrieve directory listing

以及如下来自服务器端的日志文件。

Sat Oct 26 19:59:59 2019 [pid 4896] CONNECT: Client "::ffff:217.146.82.84"
Sat Oct 26 19:59:59 2019 [pid 4896] FTP response: Client "::ffff:217.146.82.84", "220 Welcome to Bejoo FTP service."
Sat Oct 26 19:59:59 2019 [pid 4896] FTP command: Client "::ffff:217.146.82.84", "USER root"
Sat Oct 26 19:59:59 2019 [pid 4896] [root] FTP response: Client "::ffff:217.146.82.84", "331 Please specify the password."
Sat Oct 26 19:59:59 2019 [pid 4896] [root] FTP command: Client "::ffff:217.146.82.84", "PASS <password>"
Sat Oct 26 20:00:01 2019 [pid 4895] [root] FAIL LOGIN: Client "::ffff:217.146.82.84"
Sat Oct 26 20:00:02 2019 [pid 4896] [root] FTP response: Client "::ffff:217.146.82.84", "530 Login incorrect."
Sat Oct 26 20:00:30 2019 [pid 4898] CONNECT: Client "::ffff:217.146.82.84"
Sat Oct 26 20:00:30 2019 [pid 4898] FTP response: Client "::ffff:217.146.82.84", "220 Welcome to Bejoo FTP service."
Sat Oct 26 20:00:31 2019 [pid 4898] FTP command: Client "::ffff:217.146.82.84", "USER bahjat"
Sat Oct 26 20:00:31 2019 [pid 4898] [bahjat] FTP response: Client "::ffff:217.146.82.84", "331 Please specify the password."
Sat Oct 26 20:00:31 2019 [pid 4898] [bahjat] FTP command: Client "::ffff:217.146.82.84", "PASS <password>"
Sat Oct 26 20:00:31 2019 [pid 4897] [bahjat] OK LOGIN: Client "::ffff:217.146.82.84"
Sat Oct 26 20:00:31 2019 [pid 4899] [bahjat] FTP response: Client "::ffff:217.146.82.84", "230 Login successful."
Sat Oct 26 20:00:31 2019 [pid 4899] [bahjat] FTP command: Client "::ffff:217.146.82.84", "SYST"
Sat Oct 26 20:00:31 2019 [pid 4899] [bahjat] FTP response: Client "::ffff:217.146.82.84", "215 UNIX Type: L8"
Sat Oct 26 20:00:31 2019 [pid 4899] [bahjat] FTP command: Client "::ffff:217.146.82.84", "FEAT"
Sat Oct 26 20:00:31 2019 [pid 4899] [bahjat] FTP response: Client "::ffff:217.146.82.84", "211-Features:"
Sat Oct 26 20:00:31 2019 [pid 4899] [bahjat] FTP response: Client "::ffff:217.146.82.84", " EPRT??"
Sat Oct 26 20:00:31 2019 [pid 4899] [bahjat] FTP response: Client "::ffff:217.146.82.84", " EPSV??"
Sat Oct 26 20:00:31 2019 [pid 4899] [bahjat] FTP response: Client "::ffff:217.146.82.84", " MDTM??"
Sat Oct 26 20:00:31 2019 [pid 4899] [bahjat] FTP response: Client "::ffff:217.146.82.84", " PASV??"
Sat Oct 26 20:00:31 2019 [pid 4899] [bahjat] FTP response: Client "::ffff:217.146.82.84", " REST STREAM??"
Sat Oct 26 20:00:31 2019 [pid 4899] [bahjat] FTP response: Client "::ffff:217.146.82.84", " SIZE??"
Sat Oct 26 20:00:31 2019 [pid 4899] [bahjat] FTP response: Client "::ffff:217.146.82.84", " TVFS??"
Sat Oct 26 20:00:31 2019 [pid 4899] [bahjat] FTP response: Client "::ffff:217.146.82.84", " UTF8??"
Sat Oct 26 20:00:31 2019 [pid 4899] [bahjat] FTP response: Client "::ffff:217.146.82.84", "211 End"
Sat Oct 26 20:00:32 2019 [pid 4899] [bahjat] FTP command: Client "::ffff:217.146.82.84", "OPTS UTF8 ON"
Sat Oct 26 20:00:32 2019 [pid 4899] [bahjat] FTP response: Client "::ffff:217.146.82.84", "200 Always in UTF8 mode."
Sat Oct 26 20:00:32 2019 [pid 4899] [bahjat] FTP command: Client "::ffff:217.146.82.84", "PWD"
Sat Oct 26 20:00:32 2019 [pid 4899] [bahjat] FTP response: Client "::ffff:217.146.82.84", "257 "/home/bahjat""
Sat Oct 26 20:00:32 2019 [pid 4899] [bahjat] FTP command: Client "::ffff:217.146.82.84", "TYPE A"
Sat Oct 26 20:00:32 2019 [pid 4899] [bahjat] FTP response: Client "::ffff:217.146.82.84", "200 Switching to ASCII mode."
Sat Oct 26 20:00:32 2019 [pid 4899] [bahjat] FTP command: Client "::ffff:217.146.82.84", "PASV"
Sat Oct 26 20:00:32 2019 [pid 4899] [bahjat] FTP response: Client "::ffff:217.146.82.84", "227 Entering Passive Mode (64,190,204,82,195,147)."
Sat Oct 26 20:00:33 2019 [pid 4899] [bahjat] FTP command: Client "::ffff:217.146.82.84", "LIST -a"

对于如下的配置vsftpd.conf。

connect_from_port_20=YES
xferlog_enable=YES
dirmessage_enable=YES
ftpd_banner=Welcome to Bejoo FTP service.
listen=NO
listen_ipv6=YES
log_ftp_protocol=YES
pam_service_name=vsftpd
vsftpd_log_file=/var/log/vsftpd.log
tcp_wrappers=YES
data_connection_timeout=900
xferlog_file=/var/log/xferlog

是否有任何解决方法来解决此问题。

linux ftp centos7 vsftpd
1个回答
0
投票

增加此

 data_connection_timeout = 900

对于1900或更大的数字...

祝你好运!发送有关您的进度的新闻...

© www.soinside.com 2019 - 2024. All rights reserved.