Install VSFTPD on Centos 8

Installing VSFTPD

To enable FTP on your VPS, you will first need to install the VSFTPD package with the following command.

dnf install vsftpd -y

Output:

[[email protected] ~]# dnf install vsftpd -y
CentOS-8 - AppStream                             11 MB/s | 6.3 MB     00:00
CentOS-8 - Base                                 2.4 MB/s | 7.9 MB     00:03
CentOS-8 - Extras                               692  B/s | 2.1 kB     00:03
Dependencies resolved.
================================================================================
 Package         Arch            Version               Repository          Size
================================================================================
Installing:
vsftpd          x86_64          3.0.3-28.el8          AppStream          180 k

Once the installation is complete, We start the vsftpd service and enable it to start automatically at system boot.

systemctl start vsftpd
systemctl enable vsftpd

Output:

[[email protected] ~]# systemctl start vsftpd
[[email protected] ~]# systemctl enable vsftpd
Created symlink /etc/systemd/system/multi-user.target.wants/vsftpd.service → /usr/lib/systemd/system/vsftpd.service.
[[email protected] ~]#

Next, We open the FTP port on the system firewall to allow access to the FTP service from external systems.

firewall-cmd --add-service=ftp --permanent --zone=public

firewall-cmd --reload

Output:

[[email protected] ~]# firewall-cmd --add-service=ftp --permanent --zone=public
success
[[email protected] ~]# firewall-cmd --reload
success
[[email protected] ~]#

Creating an FTP user

Creating an FTP user and create a password for that user.

First, We add the user,

useradd  user2

Next, we setup a password for the user,

passwd user2

Output:

[[email protected] ~]# useradd user2
[[email protected] ~]# passwd user2
Changing password for user user2.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[[email protected] ~]#

Testing the FTP connection

Finally test FTP connection using FileZilla Client software.

Use your server hostname OR IP

Your FTP username

Your FTP Password

image