How to install vsftpd on CentOS7
跳到导航
跳到搜索
Install software
sudo yum install vsftpd
Configure vsftpd for web user (vim /etc/vsftpd/vsftpd.conf):
# No anonymous login
anonymous_enable=NO
local_enable=YES
write_enable=YES
# All users are jailed by default:
chroot_local_user=YES
chroot_list_enable=NO
allow_writeable_chroot=YES
# Only use ipv4 address
listen=YES
listen_ipv6=NO
systemctl start vsftpd
adduser -d /opt/wwwroot/domainname -s /sbin/nologin webuser
passwd webuser
For other chroot config:
# 2. Just some users are jailed:
chroot_local_user=NO
chroot_list_enable=YES
# Create the file /etc/vsftpd.chroot_list with a list of the jailed users.
# 3. Just some users are "free":
chroot_local_user=YES
chroot_list_enable=YES
# Create the file /etc/vsftpd.chroot_list with a list of the "free" users.