標籤:使用 檔案 art for 伺服器 res
使用者配置目錄:/etc/vsftpd/user.d
為每個使用者建立設定檔
比如:
#/etc/vsftpd/user.d/Tom
編輯Tom檔案,加入以下內容
local_root=/home/hyq/ftp/tom
#End
vi /etc/vsftpd/vsftpd.conf
加上以下幾行:
chroot_list_enable=YES
chroot_local_user=YES
chroot_list_file=/etc/vsftpd/chroot_list
user_config_dir=/etc/vsftpd/user.d
然後重啟VSFTPD服務service vsftpd restart
vsftp 出現500 OOPS: could not bind listening IPv4 socket 的解決方案
原因:因為同時指定了 inetd和standalone 兩種運行方式,連接埠衝突了.
解決方案:
1.使用XINET模式
去掉/etc/rc.local檔案中的vsftpd的啟動指令碼/usr/local/sbin/vsftp &
重啟xinetd服務, service xinetd restart
運行service vsftpd restart命令啟動vsftpd
2.使用STANDALONE獨立模式
在伺服器的負擔比較重的情況下最好用這個模式
或者直接修改/etc/xinetd.d/vsftpd檔案,把disable=no改成disable=yes就行了!
service vsftpd start時出現Starting vsftpd for vsftpd: [ FAILED ]
修改/etc/logrotate.d/vsftpd.log
把 missingok 注釋掉
########################################################################
vsftpd伺服器串連失敗,錯誤提示:
500 OOPS: cannot change directory:/home/*******
解決方案:
在終端輸入命令:
setsebool ftpd_disable_trans 1
service vsftpd restart
這是因為SE設定的關閉了ftp的原因。 使用命令 getsebool ftpd_disable_trans 可以查看當前的狀態如果不是on ,
那麼輸入命令 setsebool ftpd_disable_trans 1 ,當然也可以加入-P參數,
以便不需要每次開機都輸入這個命令 setsebool -P ftpd_disable_trans 1