linux vsftpd 配置部署
来源:互联网 发布:2djgame 邀请码 淘宝 编辑:程序博客网 时间:2024/05/19 16:22
系统 CentOS 6.2 ,64位
1,vsftpd 地址 https://security.appspot.com/vsftpd.html#download 当前版本 3.0.2
2,编辑 vsf_findlibs.sh 文件,将所有 /lib/ 目录更换为 /lib64/ ,make 编译, make install 安装
3,创建 /etc/vsftpd/ 配置文件目录,创建 /etc/vsftpd/vsftpd.conf 配置文件,内如如下
listen=YES
anonymous_enable=NO
local_enable=YES
download_enable=YES
write_enable=YES
local_umask=000
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log
chroot_local_user=YES
allow_writeable_chroot=YES
pam_service_name=vsftpd
guest_enable=YES
guest_username=root
user_config_dir=/etc/vsftpd/users
vsftpd 中途一次版本更新导致启用 chroot 管理后根目录不能设置写入权限,否则访问会返回
500 OOPS: vsftpd: refusing to run with writable root inside chroot
不过开放了 allow_writeable_chroot 选项,当 YES 时允许写入,但得禁止匿名访问
4,创建 /etc/vsftpd/users.txt 虚拟用户列表文件,内容为一行用户名与一行密码,例如
ftpguest
000000
5,执行命令
db_load -T -t hash -f /etc/vsftpd/users.txt /etc/vsftpd/users.db
生成虚拟用户数据库
6,编辑 /etc/pam.d/vsftpd 将内容替换为如下两行
auth required /lib64/security/pam_userdb.so db=/etc/vsftpd/users
account required /lib64/security/pam_userdb.so db=/etc/vsftpd/users
db 值为数据库路径,但不能带扩展名,否则无法访问
7,创建 /etc/vsftpd/users/ 虚拟用户配置目录,创建 /etc/vsftpd/users/ftpguest 虚拟用户配置文件,文件名与 users.txt 中用户名相同,如 users.txt 有多个用户,文件创建相应数量,内容如下
local_root=/opt/ftp/
virtual_use_local_privs=YES
download_enable=YES
write_enable=YES
local_root 值为该虚拟用户访问 ftp 时的根目录,需先创建该目录,并设置权限
8,删除 /etc/xinetd.d/vsftpd 文件,执行命令
vsftpd /etc/vsftpd/vsftpd.conf &
启动 ftp 服务器
- linux vsftpd 配置部署
- linux vsftpd 基本配置
- Linux VSFTPD 基础配置
- linux vsftpd 配置(1)
- Linux vsftpd的配置
- Linux vsftpd配置大全
- Linux vsftpd proftpd配置
- linux vsftpd配置
- Linux vsftpd配置
- linux vsftpd配置
- Linux下vsftpd配置
- linux 6.6 vsftpd 配置
- linux配置vsftpd
- 【VSFTPD】redhat Linux ftp配置(vsftpd)
- linux安装vsftpd和vsftpd配置步骤
- linux安装vsftpd和vsftpd配置步骤
- linux下安装配置vsftpd
- linux下 vsftpd的配置
- C# 将文本Text属性转换为数值形式
- Ext JS百强应用:Form验证、表单验证、表单错误提示信息位置 --第4强
- cocos2d-x 定时器 schedule
- UIScrollView的属性总结
- Cocos2d-x CCProgressTimer实现DotA的技能冷却效果
- linux vsftpd 配置部署
- cocos2d-x 自定义场景和场景跳转
- JS中showModalDialog 详细使用
- Configure AIF service on Dynamics AX step by step
- SQL Join的一些总结[转载]
- Cocos2d-x 粒子系统----实现下雪效果
- 节点事件相应
- poj2060 Taxi Cab Scheme
- 6月7日,福建省厦门市一公交车在行驶过程中突然起火