centos7 install vsftpd
install software
Install vim and vsftpd
yum -y install vim vsftpd
Linux environment
We need to close seLinux
- Open selinux configuration file
vim /etc/sysconfig/selinux
- The SELINUX = enforcing changed SELINUX = disabled
You need to turn off the firewall
1. Under the firewall open state closed boot from Kai
systemctl disable firewalld.service systemctl stop firewalld.service
Profiles
1. Modify the configuration file
# 运行 vim /etc/vsftpd/vsftpd.conf
# 找到 下面四条语句 anonymous_enable=YES #ascii_upload_enable=YES #ascii_download_enable=YES #chroot_local_user=YES -------------------- # 改为 下面四条语句 anonymous_enable=NO ascii_upload_enable=YES ascii_download_enable=YES chroot_local_user=YES #最后一行添加 allow_writeable_chroot=YES
2. Create user ftp
# 创建用户 useradd user1 # 这里的user1是用户名.你可以自定义 # 修改刚刚创建用户的密码 echo 123456 |passwd --stdin user1 #设置user1的密码为123456
Configuring vsftpd boot
# 运行命令 chkconfig vsftpd on # 重启 reboot
Finally Description
If you press me step by step operation. Then
ftp root directory is / home / user1 /
The public network ip ftp your virtual machine ip
ftp port is 21
ftp account is user1
ftp password is 123456
This tutorial is for virtual machines, servers do not easily test, due to the closure of the firewall.