如果在磁碟區中安裝資料夾,則使用綁定資料夾安裝不會出現在 FTP 用戶端中

如果在磁碟區中安裝資料夾,則使用綁定資料夾安裝不會出現在 FTP 用戶端中

我使用 mount 綁定參數在 ftp 資料夾中安裝了一個外部資料夾(來自 ftp 資料夾外部):

mount --bind sourcefolder destinationfolder

該資料夾已正確安裝,我可以在 ssh 用戶端中看到文件,但如果我連接到 FTP,則安裝的資料夾根本不會出現。如果我嘗試在 ftp 用戶端中建立一個同名的資料夾,顯然它不允許我創建它,因為相同的資料夾已經存在。我的 vsftpd 設定如下:(vsftpd 在 openVPN 下運行,不知道這是否是問題所在)

請注意:我嘗試使用綁定掛載位於外部磁碟區(分割區)中的資料夾。如果我將資料夾安裝在與 FTP 資料夾相同的分割區中,它就可以工作。但我需要安裝其他分割區卷。

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
chroot_local_user=YES
userlist_deny=NO
userlist_file=/etc/vsftpd/users_allow
listen_address=10.8.0.1
pasv_enable=YES

使用的客戶端是Filezilla 3.7.0.2

答案1

如果使用該allow_other選項掛載資料夾,磁碟將顯示:

mount --bind ​-o allow_other sourcefolder destinationfolder

這是因為該vsftpd進程還需要能夠存取已安裝的目錄才能將其顯示給客戶端。

相關內容