FTP stands for File Transfer Protocol, a file transfer protocol between computers that has been used for decades. Although many security solutions have been added, FTP is still fundamentally an insecure method of transferring files. However, FTP is still useful when delivering files to multiple users, or when working in a private and secure network.
This tutorial, Customer Service will demonstrate how to install and configure FTP Server to use VSFTPD on CentOS 7.
How to Installing, Configuring and Secure FTP Server On CentOS 7
Step 1: install FTP Service with VSFTPD:
First we need to update the Yum: yum upgrade package
Next we need to update the Yum: yum update package
Then wait for the installation process to complete.
This tutorial uses VSFTPD (“Very Secure FTP Daemon software package”), which has a relatively easy to use software utility for creating an FTP server.
Install VSFTPD with the command:
yum install vsftpd -y
Edit the vsftpd configuration file at /etc/vsftpd/vsftpd.conf:
Navigate to the following lines and make the changes below:
[...] ## Disable anonymous login ## anonymous_enable=NO ## Uncomment these lines## ascii_upload_enable=YES ascii_download_enable=YES ## Uncomment - Enter Welcome message - It's just an option## ftpd_banner=Welcome to UNIXMEN FTP service. ## Add this line at the end of the file ## use_localtime=YES Launch the service and set it to run automatically with the command line: systemctl start vsftpd systemctl enable vsftpd Next, create a Firewall rule to allow FTP traffic to go through port 21: firewall-cmd --zone = public --permanent --add-port = 21 / tcp firewall-cmd --zone = public --permanent --add-service = ftp firewall-cmd –-reload Next, update the SELinux boolean value for the FTP service: setsebool -P ftp_home_dir on Create FTP user: By default, the root user is not allowed to log into the FTP server for security reasons. So here I create a username dongpolice to test, password is also "dongpolice". - useradd: dongpolice - passwd: dongpolice Connect to FTP server: Next, we try to log into the FTP server using the user "dongpolice": ftp 192.168.1.2 Enter your FTP username and password. Results returned : Connected to 192.168.1.2 (192.168.1.2). 220 Welcome to UNIXMEN FTP service. Name (192.168.1.2:root): dongpolice 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> So we can successfully login to the FTP server.