Installing an FTP server

Multiple clients need a file exchange, and one of the common services that allows an easy and fast file exchange is the FTP technologies.

Vsftpd (Very Secure File Transfer Protocol Daemon) is a popular FTP server

Install vsftpd

we need to install an FTP server using the default package manager:

sudo yum install vsftpd ftp

Then we should restart the service and add it to the system startup

sudo systemctl start vsftpd
sudo systemctl enable vsftpd

Configure Firewall

we need to open the FTP port in the firewall:

sudo firewall-cmd --permanent --add-port=21/tcp
sudo firewall-cmd --permanent --add-port=20/tcp
sudo firewall-cmd --permanent --add-service=ftp
sudo firewall-cmd --reload    


Then update the SELinux Boolean values for FTP service:

sudo semanage boolean -m ftpd_full_access --on

Create FTP User

we should make some FTP users so clients can use them to log in

sudo useradd ftpdev
sudo passwd ftpdev

Test FTP

we can start testing the service by going to one of the clients, and do as follows

ftp Server_IP_Address

we type in the user and its password which we have already defined. If we get access to the FTP service that means that our FTP server is successfully set up.

Add Comment