我已經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
解決該問題。