We need to upload files or download files to the centos server. In this case, FTP must be installed.

We choose the mainstream VSFTP;

 

Step 1: Install VSFTP

yum install -y vsftpd

 

Step 2: Set boot

systemctl enable vsftpd

 

Step 3: Start the FTP service

systemctl start vsftpd.service

 

Step 4: Turn on the firewall

 firewall-cmd –zone=public –add-port=21/tcp –permanent

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

 firewall-cmd –reload

 

(Permanently add TCP 21 port)

(Adding the FTP service)

(Restart the firewall.)

 

Step 5: Add a user

useradd -g root -d /home/data -s /sbin/nologin javaclimb

Add a New Javaclimb user to the root group

However, users are not allowed to log in, only FTP login

The default FTP login directory is /home/data

 

Step 6: Set the user password

passwd  javaclimb

 

Step 7: Set permissions

chown -R  javaclimb:root /home/data

setsebool -P ftpd_full_access on

 

Step 8: Modify the VSFTP configuration file to disable anonymous login

vi /etc/vsftpd/vsftpd.conf

Anonymous_enable =YES change to anonymous_enable=NO

Input – > : wq! Save the exit

 

Finally, verification:

I usually use FTP Rush

Configure the connection can be;