Installing VSFTPD As Your FTP Server In CentOS 7 And VMware
This tutorial outlines the process of installing VSFTPD as a FTP server on a clean LAMP server. This tutorial presumes you have a minimal install of CentOS 7. You need to be logged in to the server using Putty or equivalent as an administrator. It may be necessary to su to root at one point for some functions.
I highly recommend you create a new document in NotePad++ or your favorite text editor. Copy the commands found below into your new document where you can then make changes such as server name, user name etc. You can then copy and paste these lines of code one at a tine into Putty. This will give you a reliable document showing exactly how you created your VSFTPD installation
For this tutorial we will be using the local ip address 192.168.1.122.
Now lets get started.
Install VSFTPD.
Start VSFTPD.
Allow VSFTPD to start on boot.
Allow VSFTPD through the firewall.
sudo firewall-cmd --zone=public --permanent --add-service=ftp
sudo firewall-cmd --reload
Backup the VSFTPD configuration file.
Edit the VSFTPD configuration file using nano.
Make sure the conf file matches these settings.
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
ascii_upload_enable=YES
ascii_download_enable=YES
listen=NO
listen_ipv6=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
userlist_deny=NO
Save the file and restart VSFTP.
Add a user to FTP.
Change ftp user password.
Add ftpuser to user_list.
echo "ftpuser" | tee -a /etc/vsftpd/user_list
su administrator
Disable SELINUX.
Edit this line as shown.
Reboot.
Log back in using Putty and check the status of SELINUX.
SELinux status: disabled
Done.