2012年7月19日 星期四

[轉貼]CentOS vsftpd FTP Server 安裝設定


vsftpd 標榜使用較為安全的設計方式,與提供更快速更穩定與更安全的方式來設計 vsftpd,接下來則開始安裝設定 vsftpd。

安裝 vsftpd
#yum install vsftpd

編輯 vsftpd 設定檔
#vi /etc/vsftpd/vsftpd.conf

vsftpd.conf  設定
anonymous_enable=YES #匿名者是否可以登入
anon_root=/var/ftp #可以指定匿名者登入後所在目錄,預設為 /var/ftp
tcp_wrappers=YES #如為 YES 可以設定 /etc/hosts.allow  與  /etc/hosts.deny
chroot_local_user=YES #隔離使用者可以閱覽的目錄

啟動 vsftpd
#service vsftpd start

資料來源:簡單過生活http://iammic.pixnet.net/blog/post/8947114-centos-vsftpd-ftp-server-%E5%AE%89%E8%A3%9D%E8%A8%AD%E5%AE%9A


實際使用上到這邊還是不能WORK,於是要新增使用者

Now your FTP server is up and running. It is time to add additional users to FTP server so that they can login into account to upload / download files. To add a user called tom and set the password, enter:
# adduser -c 'FTP USER Tom' -m tom
# passwd tom

Now tom can login using our ftp server. Make sure the following is set in vsftpd.conf
local_enable=YES
Restart the vftpd:
# service vsftpd restart

資料來源:
http://www.cyberciti.biz/tips/linux-creating-ftp-account-with-vsftpds.html 

最後實測上,只有新增的使用者可以連上,任意使用者不行
另外,連線的PORT要使用22,PORT21不行





沒有留言:

張貼留言