pureftpd mysql auth 在一台伺服器上工作,但在具有相同配置的其他伺服器上工作

pureftpd mysql auth 在一台伺服器上工作,但在具有相同配置的其他伺服器上工作

系統:
Ubuntu 16.04
Percona Server(使用 Galera 叢集)
來自 Ubuntu 儲存庫的 pure-ftpd-mysql

pureftpd 資料庫被複製到叢集中的所有五台伺服器,我已經驗證複製正常工作並且表是相同的。

問題: 我在分散式叢集中的五台伺服器之一上安裝了 pure-ftpd-mysql,並讓它正確驗證使用者身分。

在其他每台伺服器上安裝 pure-ftpd-mysql 後,我關閉每台伺服器上的 pure-ftpd,刪除其 中的資料夾/etc,並用於scp -r /etc/pure-ftpd server/etc/pureftpd將工作設定檔從第一台伺服器複製到其他四台伺服器。

我可以連接到每台伺服器上的 ftpd,但我只能登入第一個伺服器。VerboseLog每個上都設定了。以下是工作日誌和非工作日誌之一的系統日誌輸出:

工作:主持人hub

Jan 21 06:13:32 h0 pure-ftpd: ([email protected]) [INFO] New connection from 68.103.155.231
Jan 21 06:13:32 h0 pure-ftpd: ([email protected]) [DEBUG] Command [auth] [TLS]
Jan 21 06:13:32 h0 pure-ftpd: ([email protected]) [DEBUG] Command [auth] [SSL]
Jan 21 06:13:32 h0 pure-ftpd: ([email protected]) [DEBUG] Command [user] [test]
Jan 21 06:13:32 h0 pure-ftpd: ([email protected]) [DEBUG] Command [pass] [<*>]
Jan 21 06:13:32 h0 pure-ftpd: ([email protected]) [INFO] test is now logged in
Jan 21 06:13:32 h0 pure-ftpd: ([email protected]) [DEBUG] Command [opts] [UTF8 ON]
Jan 21 06:13:32 h0 pure-ftpd: ([email protected]) [DEBUG] Command [pwd] []

非工作:主機l1

Jan 21 06:15:28 l1 pure-ftpd: ([email protected]) [INFO] New connection from 68.103.155.231
Jan 21 06:15:28 l1 pure-ftpd: ([email protected]) [DEBUG] Command [auth] [TLS]
Jan 21 06:15:28 l1 pure-ftpd: ([email protected]) [DEBUG] Command [auth] [SSL]
Jan 21 06:15:28 l1 pure-ftpd: ([email protected]) [DEBUG] Command [user] [test]
Jan 21 06:15:28 l1 pure-ftpd: ([email protected]) [DEBUG] Command [pass] [<*>]
Jan 21 06:15:28 l1 pure-ftpd: ([email protected]) [INFO] PAM_RHOST enabled. Getting the peer address
Jan 21 06:15:34 l1 pure-ftpd: ([email protected]) [WARNING] Authentication failed for user [test]
Jan 21 06:15:34 l1 pure-ftpd: ([email protected]) [INFO] Logout.

我發現有關該PAM_RHOST項目的資訊有限,我有點理解為什麼會發生這種情況,但我不確定如何將其關閉。這是目前的配置:

AltLog
clf:/var/log/pure-ftpd/transfer.log

ChrootEveryone
yes

CreateHomeDir
yes

DontResolve
yes

FSCharset
UTF-8

MinUID
1000

MySQLConfigFile
/etc/pure-ftpd/db/mysql.conf

NoAnonymous
yes

PAMAuthentication
no

PureDB
/etc/pure-ftpd/pureftpd.pdb

TLSCipherSuite
ALL:!aNULL:!SSLv3

UnixAuthentication
no

VerboseLog
yes

此時我不知道為什麼從工作伺服器複製到其他伺服器的配置現在允許我登入。尋找想法和資源來找到這個答案...

答案1

我透過刪除pure-ftpd-mysql並重新安裝 解決了這個問題

apt remove pure-ftpd-mysql
apt autoremove
apt install pure-ftpd-mysql

相關內容