码迷,mamicode.com
首页 > 其他好文 > 详细

centos 6.4 安装配置vsftp

时间:2014-12-02 15:26:39      阅读:115      评论:0      收藏:0      [点我收藏+]

标签:vsftpd 虚拟用户登录

  1. yum install vsftpd  db4-utils

  2. 因为要使用虚拟用户登录.

    修改如下文件 a:/etc/pam.d/vsftpd ;添加两行

auth required /lib64/security/pam_userdb.so db=/etc/vsftpd/vftpuser

account required /lib64/security/pam_userdb.so db=/etc/vsftpd/vftpuser

系统64位  很多网上资料 写的是/lib/security/pam_userdb.so 这里要改一下

3.  配置文件 vsftpd.conf

    

listen=YES


local_enable=YES

write_enable=YES

local_umask=022

dirmessage_enable=YES

xferlog_enable=YES

connect_from_port_20=YES

xferlog_std_format=YES

userlist_enable=YES

tcp_wrappers=YES



anonymous_enable=NO

guest_enable=YES

guest_username=ftpadmin   #虚拟目录对应的账号

pam_service_name=vsftpd

anon_world_readable_only=NO

anon_upload_enable=YES

anon_mkdir_write_enable=YES

anon_other_write_enable=YES

user_config_dir=/etc/vsftpd/vsftpd_user_conf #配置虚拟用户的单独配置路径,如家目录等

anon_umask=022


4. 添加用户ftpadmin

5. 添加用户名密码 到文件vftpuser.txt 

    格式为  用户名

            密码

6. db_load -T -t hash -f /etc/vsftpd/vftpuser.txt /etc/vsftpd/vftpuser.db 密码生成到数据文件


7./etc/rc.d/init.d/vsftpd restart 重启即可


配置文件后不能有空格 否则会报错,比如上面加入注释的地方。

要允许local_enable=YES 否则530登录报错  还有超时错误还不清楚原因



本文出自 “好记性不如烂笔头” 博客,请务必保留此出处http://cobweb.blog.51cto.com/390607/1585396

centos 6.4 安装配置vsftp

标签:vsftpd 虚拟用户登录

原文地址:http://cobweb.blog.51cto.com/390607/1585396

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!