Build an FTP server with vsftpd on CentOS / RHEL / Fedora

At this time we will implement one of the features of a Linux server, the FTP server. FTP servers, as we know, are one of the services on Linux that are more specifically for data exchange. In this article, we are building an FTP server with vsftpd on CentOS / RHEL / Fedora, where we will try to install and configure an FTP server with vSFTPD as its daemon, along with the steps:
Install vsftpd

# yum install vsftpd

After the installation process is complete, run vsftpd and check the status with netstat

# service vsftpd start
# netstat -a | grep ftp

make sure that the vsftpd process is running, as follows:

[root@backlinux ~]# netstat -a | grep ftp
tcp        0      0 *:ftp           *:*        LISTEN

in the step below, we will configure vsftpd.conf which is in /etc/vsftpd/vsftpd.conf:
The Anonymous / guest user home folder is in / data / ftp / guest user;

# mkdir -p /data/ftp/guest-user
# vi /etc/vsftpd/vsftpd.conf

add the following code (default /var/ftp);

anon_root=/data/ftp/guest-user

Create an upload location folder for anonymous / guest users:

# mkdir -p /data/ftp/guest-user/uploads
# chmod 722 /data/ftp/guest-user/uploads

Modified vsftpd welcome banner

# vi /etc/vsftpd/vsftpd.conf

edit / add the following code;

ftpd_banner= Masukkan welcome banner FTP server disini | BackLinux.com

Make FTP user with “Read / read” access rights on FTP share directory

Edit the file /etc/vsftpd/vsftpd.conf

# vi /etc/vsftpd/vsftpd.conf

Update or adjust with the following code:

anonymous_enable=NO
local_enable=YES

Restart service vsftpd server

# service vsftpd restart

Create a ftp-users group and the ftp-documents home folder that will be used as an information / FTP location of each user.

# groupadd ftp-users
# mkdir /home/ftp-documents
# chmod 750 /home/ftp-documents
# chown root:ftp-users /home/ftp-documents

Add a user to register into the respective group and home folder.

# useradd -g ftp-users -d /home/ftp-documents user1
# useradd -g ftp-users -d /home/ftp-documents user2
# useradd -g ftp-users -d /home/ftp-documents user3
# useradd -g ftp-users -d /home/ftp-documents user4
# passwd user1
# passwd user2
# passwd user3
# passwd user4
# chown root:ftp-users /home/ftp-documents/*
# chmod 740 /home/ftp-documents/*

I hope it has been a useful article.