安装vsftp

这篇博客简单记录了vsftp的安装,不涉及具体参数的解释说明

安装环境

# cat /etc/redhat-release 
CentOS Linux release 7.5.1804 (Core) 
# getenforce 
Disabled
# systemctl is-active firewalld.service 
unknown

yum安装vsftp

# yum list |grep vsftp
vsftpd.x86_64                          3.0.2-25.el7                    @base    
vsftpd-sysvinit.x86_64                 3.0.2-25.el7                    base 

# yum -y install vsftpd

修改配置文件

# cd /etc/vsftpd/

# cat vsftpd.conf
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_root=/data            #ftp管理目录,没有的话就创建,这个目录需要相应的用户具有rwx权限
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/xferlog      
xferlog_std_format=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list      #没有就创建
listen=YES
pam_service_name=vsftpd
userlist_file=/etc/vsftpd/user_list
userlist_enable=YES
userlist_deny=NO
tcp_wrappers=YES
allow_writeable_chroot=YES     #没有这一行,有时会报错:500 OOPS: vsftpd: refusing to run with writable root inside chroot()

配置用户

# cd /data
# echo "welcome to my ftp\!">>.message
# cd /etc/vsftpd/
# vim user_list 
root
work

创建用户和缺少的文件

# useradd work
# echo '123456'|passwd --stdin work
# touch /etc/vsftpd/chroot_list

启动并测试

# systemctl restart vsftpd.service

 

转载于:https://www.cnblogs.com/Go-Spurs-Go/p/10936390.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值