CentOS Stream 9
Sponsored Link

FTP Server : Install Vsftpd2022/03/30

 
Install Vsftpd to configure FTP Server.
[1] Install and Configure Vsftpd.
[root@www ~]#
dnf -y install vsftpd
[root@www ~]#
vi /etc/vsftpd/vsftpd.conf
# line 12 : make sure it's [NO] to prohibit anonymous login

anonymous_enable=NO
# line 100,101 : uncomment to enable chroot
# and add the line to enable writable under the chroot directory

chroot_local_user=YES
chroot_list_enable=YES
allow_writeable_chroot=YES
# line 103 : uncomment to enable chroot list file

chroot_list_file=/etc/vsftpd/chroot_list
# line 109 : uncomment to enable recursive transfer

ls_recurse_enable=YES
# line 114 : set YES if listen only IPv4
# if listen both IPv4 and IPv6, set NO

listen=NO
# line 123 : set NO if not listen IPv6
# if listen both IPv4 and IPv6, set YES

listen_ipv6=YES
# add to the end
# specify root directory if you need
# if not specify it, users' home directory is the FTP home directory

local_root=public_html
# use local time

use_localtime=YES
[root@www ~]#
vi /etc/vsftpd/chroot_list
# add users you allow to move over their home directory

cent
[root@www ~]#
systemctl enable --now vsftpd

[2] If SELinux is enabled, change boolean setting.
[root@www ~]#
setsebool -P ftpd_full_access on

[3] If Firewalld is running, allow FTP service ports.
[root@www ~]#
firewall-cmd --add-service=ftp

success
[root@www ~]#
firewall-cmd --runtime-to-permanent

success
Matched Content