ftp的安裝很簡單,yum install -y vsftpd 但是它的配置內容很多,詳細請看http://www.cnblogs.com/hnrainll/archive/2011/02/16/1956538.html
我個人覺得作者寫得很詳細,其中需要幾個注意點,在這裏給說一下。
1、user_list這個文件內容
# vsftpd userlist # If userlist_deny=NO, only allow users in this file # If userlist_deny=YES (default), never allow users in this file, and # do not even prompt for a password. # Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers # for users that are denied.
在vsftpd.conf文件中需要加入userlist_deny=NO ,這樣,在這個文件把ftp用戶名寫入,就代表允許此用戶登錄。
2、chroot設置
chroot_list_enable=YES chroot_list_file=/etc/vsftpd/chroot_list
這兩個參數在vsftpd.conf文件中需要加入,然後chroot_list文件中加入ftp用戶名,此用戶名即被限制,不能跳出,訪問其他的加目錄。
3、日誌設置
xferlog_enable=YES dual_log_enable=YES xferlog_file=/var/log/ftp.log vsftpd_log_file=/var/log/vsftpd.log
這樣,當ftp遇到問題,登錄不了,上傳失敗等,就可以查詢日誌,更快的判斷問題。
關於日誌分析,請詳細看 http://www.qianshoublog.com/post/8411.html