Page 112 - RHEL8 BOOK
P. 112
CONFIGURATION OF FTP SERVER
1. Installing through rpm/yum.
[root@sun pub]# rpm -ivh vsftpd* --force --aid
[root@sun pub]# yum install vsftpd* -y
2. Edit the main configuration File
[root@sun ~]#vi /etc/vsftpd/vsftpd.conf
12 anonymous_enable=YES #==> line 12: To enable anonymous access
16 local_enable=YES #==>enable local user access
19 write_enable=YES
29 anon_upload_enable=yes (Uploading PUT command used)
33 anon_mkdir_write_enable=YES (Uploading PUT command used)
37 dirmessage_enable=YES
86 ftpd_banner=Welcome to Zoom Linux
3. Create the resources (Files/folders) on ftp server/ Add some files to the ftp default directory
[root@sun ~]#cd /var/ftp/pub
[root@sun pub]# touch zfa.txt zfb.txt zfc.txt
[root@sun pub]# chmod 777 /var/ftp/pub
[root@sun pub]# ls
4. Create the users on FTP server.
[root@sun pub]# useradd tom
[root@sun pub]# passwd tom
5. To Block the FTP Server users
[root@sun ~]#vi /etc/vsftpd/ftpusers
Joy
6. Start the services
[root@sun ~]#systemctl start vsftpd
7. Enable the vsftpd service:
[root@sun ~]#systemctl enable vsftpd
8. Check the status of the service
[root@sun ~]#systemctl status vsftpd
9. Allow the ftp service and port 20 & 21 via firewall.
root@sun ~]#firewall-cmd --zone=public --permanent --add-port=21/tcp
root@sun ~]#firewall-cmd --zone=public --permanent --add-port=45073/tcp
root@sun ~]#firewall-cmd –reload
10. Set the following SELinux boolean rule to enable FTP to read/write files of user’s home
directory.
root@sun ~] # semanage boolean -m ftpd_full_access –on
S. Pradhan
(MCA, MBA-IT, BCA, CCNA, MCSA 2012, RHCE, ETHICAL HACKING)
Email Id:-spradhan.iiht@gmail.com
112