FTP stands for File Transfer Protocol. It is similar to HTTP (Hyper Text Transfer Protocol), in that it specifies a language for transferring data over a network.
FTP is not encrypted by default, so by itself, it is not a good choice for secure transmission of data.
Step1: Install VSFTPD
We’ll start by updating our package list and installing the vsftpd daemon:
sudo apt-get update -y && sudo apt-get install vsftpd -y
sudo yum -y update && sudo yum -y install vsftpd
Step 2: Configure the vsftpd.conf file
Now let’s edit the configuration file for vsftpd. Open the configuration file with the following command:
# Allow anonymous FTP? (Disabled by default).
# Uncomment this to allow local users to log in.
#If you want local user to be able to write to a directory, then change the write_enable setting to YES:
#To prevent the FTP users to access any files outside of their home directories uncomment the chroot setting.
#Use this option if you must to grant writable access to your user to its home directory.
# ADD this line in end of configuration file
Step 3: Start the VSFTPD service.
sudo systemctl restart vsftpd
Step 4: Create an FTP user
sudo useradd -m “username”
sudo passwd “username”
Step 5: Test the FTP Connection
Step 6: Enable the service so it will comes up when system reboot
sudo systemctl enable vsftpd
Optional for AWS
Step 7: Enable the port 20-21 from security group to access ftp.
Step 8: Now, Test the FTP Connection from your system.