RHEL6 上的“lftp”无法连接到 RHEL7 上的 vsftpd

RHEL6 上的“lftp”无法连接到 RHEL7 上的 vsftpd

我已经vsftpd在 RHEL7 上进行了配置,并且正在尝试使用lftpRHEL6 向其传输数据。

lftpPASS发送登录命令后似乎失败anonymous

---> USER anonymous
<--- 331 Please specify the password.
---> PASS xxxxxx
**** gnutls_record_recv: An unexpected TLS packet was received.
---- Closing control socket
cd: Fatal error: gnutls_record_recv: An unexpected TLS packet was received.

对应的vsftpd日志消息:

Wed Mar 18 08:20:41 2020 [pid 37007] FTP command: Client "XX.XXX.XX.XX", "USER anonymous"
Wed Mar 18 08:20:41 2020 [pid 37007] [anonymous] FTP response: Client "XX.XXX.XX.XX", "331 Please specify the password."
Wed Mar 18 08:20:41 2020 [pid 37007] [anonymous] FTP command: Client "XX.XXX.XX.XX", "PASS <password>"
Wed Mar 18 08:20:41 2020 [pid 37006] [cfgdb] OK LOGIN: Client "XX.XXX.XX.XX", anon password "xxxxxx"

lftp但在连接到vsftpdRHEL6 上配置的系统时,效果相同。vsftpd成功连接时来自 RHEL6 的日志:

Wed Mar 18 06:16:26 2020 [pid 706] FTP command: Client "XX.XXX.XX.XX", "USER anonymous"
Wed Mar 18 06:16:26 2020 [pid 706] [anonymous] FTP response: Client "XX.XXX.XX.XX", "331 Please specify the password."
Wed Mar 18 06:16:26 2020 [pid 706] [anonymous] FTP command: Client "XX.XXX.XX.XX", "PASS <password>"
Wed Mar 18 06:16:26 2020 [pid 703] [cfgdb] OK LOGIN: Client "XX.XXX.XX.XX", anon password "xxxxxx"
Wed Mar 18 06:16:26 2020 [pid 709] [cfgdb] FTP response: Client "XX.XXX.XX.XX", "230 Login successful."

lftpRHEL6 上的版本:

# lftp -v
LFTP | Version 4.0.9 | Copyright (c) 1996-2010 Alexander V. Lukyanov

vsftpd在 RHEL7 上:

# vsftpd -v
vsftpd: version 3.0.2

答案1

设法使用找到问题strace

当我调试vsftpd使用时strace,出现错误消息Cannot change directory

vsftpd尝试切换到主目录,ftp_username当目录丢失时,vsftpd失败(尽管任何地方都没有记录错误)。

创建主目录以ftp_username解决该问题。

相关内容