Note: We have explained the procedure and commands on Linux Mint 20 OS. More or less the same procedure can be followed in older Mint versions.
Installing FTP server
To install an FTP server on Linux Mint, follow the below steps:
Step 1: Install VSFTPD
Our first step will be to install VFTPD on our system. To do so, launch the Terminal in Mint OS by using the Ctrl+Alt+T keyboard shortcut. Then issue the following command in the Terminal to update the system repository index:
Then install VSFTPD using the following command in Terminal:
After the installation of VSFTPD is completed, we will move towards configuration.
Step 2: Configure VSFTPD
The VSFTPD can be configured through the /etc/vsftpd.conf file. Edit the /etc/vsftpd.conf file using the following command in Terminal:
Now add or uncomment the following lines (if already added in the file):
Once done, save and close the /etc/vsftpd.conf file.
Step 3: Allow ports in firewall
If a firewall is running on your system, you will need to allow some FTP ports through it. Issue the following commands in Terminal to allow the ports 20 and 21:
$ sudo ufw allow 21/tcp
You can verify whether the port has been allowed in the firewall or not using the following command in Terminal:
Step 4: Enable and run VSFTPD
Now the VSFTPD is configured and allowed in the firewall; now we can enable and run the VSFTPD services. Here are the commands to do so:
To enable the VSFTPD service to start on boot, issue the following command in Terminal:
To run the VSFTPD service, issue the following command in Terminal:
If you need to restart the VSFTPD service after making any configuration changes, issue the following command in Terminal:
To verify if the VSFTPD is active and running, issue the following command in Terminal:
Step 5: Create an FTP user
Next, create a user account that will be used to test the FTP connection. Issue the following commands in Terminal to create a user account and set a password:
$ sudo passwd <username>
Step 6: Test FTP connection
Now our FTP server is ready, so it’s time to test the FTP connection.
To test FTP connection locally, issue the following command in Terminal by replacing the <ip-address> by the actual IP address of your FTP server:
You can also test the FTP connection remotely by using the same above command from the remote system. I have tested the FTP connection from the Windows machine on the network.
You can also use the FTP client like Filezilla to connect to the FTP server. To use the Filezilla application for connecting to the FTP server, provide the IP address of FTP server, username and password that you have set earlier, and port number 21 and then click the Quickconnect button.
Once connected, you will be successfully signed in to the FTP server and will be able to access remote server files and folders.
There you have the installation and configuration of the FTP server on the Linux Mint 20 system. By following the above described simple steps, you can easily setup the FTP server and transfer files through it.