我已经vsftpd
在 RHEL7 上进行了配置,并且正在尝试使用lftp
RHEL6 向其传输数据。
lftp
PASS
发送登录命令后似乎失败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
但在连接到vsftpd
RHEL6 上配置的系统时,效果相同。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."
lftp
RHEL6 上的版本:
# 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
解决该问题。