08. Demo FTP Server on CentOS 8
Install FTP
#yum install ftp vsftpd -y
===============================================
#firewall-cmd –permanent –zone=public –add-service=ftpd
===============================================
Config VSFTPD
#vi /etc/vsftpd/vsftpd.conf
anonymous_enable=NO
local_enable=YES
write_enable=YES
chroot_local_user=YES
allow_writeable_chroot=YES
ascii_upload_enable=YES
ascii_download_enable=YES
ftpd_banner=Welcome to My Creation FTP Serivce
use_localtime=YES
userlist_file=/etc/vsftpd/user_list
userlist_deny=NO
pasv_min_port=30000
pasv_max_port=31000
rsa_cert_file=/etc/vsftpd/vsftpd.pem
rsa_private_key_file=/etc/vsftpd.pem
ssl_enable=YES
===============================================
Create Credentials
$ sudo openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/vsftpd.pem -out /etc/vsftpd/vsftpd.pem
===============================================
setsebool -P tftp_home_dir on
Create User
#useradd ftpuser
#passwd ftpuser
#ftp local ip
ftpuser
passwd
===============================================
Create Folder
$ sudo mkdir -p /home/ftpuser/ftp_dir
$ sudo chmod -R 777 /home/ftpuser/ftp_dir
$ sudo chown -R ftpuser: /home/ftpuser/ftp_dir
===============================================
systemctl restart vsftpd
$ sudo firewall-cmd –permanent –add-port=20-21/tcp
$ sudo firewall-cmd –permanent –add-port=30000-31000/tcp
$ sudo firewall-cmd –reload
FileZilla Config on Client
EditSettings
ftp select “Active”
Passive mode select “Fall back to active mode”
centos 8