In this article, you will be going learn how to set up your own FTP server to exchange data between server and client using the VSFTPD in a very simple way.
What is FTP?
FTP is an acronym for File Transfer Protocol used to transfer data between the host system and the client system. You can easily set up an FTP server on a host system through which all clients can be connected using FTP client software and then start exchanging files between the remote server and client.
The default protocol used by FTP is 20 or 21 to establish the connection between remote server and client, just like an 80 or 81 for HTTP.
Note: Countless attacks can be prevented by changing default port for FTP server.
An FTP address uses the prefix ftp:// to establish the connection between remote server and client, just like an HTTP uses http:// or https://.
Step 1: Installation VSFTPD in Linux
Quickly copy or write the below command in the terminal to install vsftpd on Debian-based distributions such as Ubuntu and PopOS.
$ sudo apt install vsftpd -y
Use the below command for RedHat, Fedora, or SUSE users.
$ dnf install vsftpd -y
If you are an Arch or Manjaro user, then follow the below command.
$ sudo pacman -Sy vsftpd
Step 2: Configuring FTP server
You can easily configure VSFTPD from configuration file located at /etc/vsftpd.conf. We suggest a few changes to make before starting your FTP server.
Disable anonymous login:
Make sure to turn off anonymous login from the configuration file to prevent unauthorized access to your system to anyone behind you.
Enable Changes to the FTP Server:
Set YES to write_enable to make changes on the server; otherwise, any changes made by the FTP cannot persist after the connection is closed.
Setting up Chroot
You can set a chroot environment to prevent users from changing their current home directory. To enable make a change like shown below in your configuration file.
Step 3: Restart your FTP Server
The final step, restart your FTP server to set changes properly.
$ sudo systemctl restart vsftpd
That’s how we install and setupVSFTPD Server in our Linux System. If you have an issue related to any above steps, make sure to ask in the comment section.
Innovative tech mind with 12 years of experience working as a computer programmer, web developer, and security researcher. Capable of working with a variety of technology and software solutions, and managing databases.