Chinaunix首页 | 论坛 | 博客
  • 博客访问: 658236
  • 博文数量: 121
  • 博客积分: 1425
  • 博客等级: 中尉
  • 技术积分: 2059
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-03 15:34
文章分类

全部博文(121)

文章存档

2018年(1)

2017年(2)

2016年(1)

2015年(11)

2014年(14)

2013年(47)

2012年(45)

分类: IT业界

2012-10-24 10:36:42

vsftp(Very Sucere FTP)是一款非常安全的FTP
开始安装,我们采用的是yum来安装
yum -y install vsftp*   #开始安装vsftp服务
yum install db4-utils*  
安装完成需要去做配置:
service vsftpd start  #启动
service vsftpd stop   #停止

chkconfig vsftpd on    #开启开机启动
chkconfig vsftpd --level 35 on #在3 5模式下开机启动

为了不关闭selinux 我们这样去配置
setsebool -P ftp_home_dir=1
setsebool -P allow_ftpd_anon_write=1
chcon -R -t /var/ftp/

useradd -d /var/ftp/vuserdir -s /sbin/nologin  vuser
chmod o+rw /var/ftp/vuserdir

vim /etc/vsftpd/vftpuser.txt   #生成虚拟目录用户
tongyzhang
111
tomyang
222

db_load -T -t hash -f /etc/vsftpd/vftpuser.txt  /etc/vsftpd/vftpuser.db #生成虚拟目录用户的数据文件

chmod 600 /etc/vsftpd/vftpuser.db  #给予权限

vim /etc/pam.d/vsftp
将原有的注释了 换现在的 
auth required /lib/security/pam_userdb.so db=/etc/vsftpd/vftpuser
account required /lib/security/pam_userdb.so db=/etc/vsftpd/vftpuser

vim /etc/vsftpd/vsftpd.conf
添加这些
guest_enable=YES
guest_username=vuser
user_config_dir=/etc/vsftpd/vuserconf
max_per_ip=2                           #同一个IP的连接数是两次
anonymous_enable=NO
 
cd /etc/vsftpd
mkdir vuserconf
cd vuserconf/
vim tonyzhang
写入:
write_enable=YES

service vsftpd restart

阅读(1088) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~