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