How to Setup & Install an FTP Server With VSFTPD on CentOS 7

Introduction

If you are looking to install an FTP server, you can’t beat the simplicity of VSFTPD.

FTP stands for File Transfer Protocol. It has been a standard method for transferring files between computers for decades.

Although security measures have been added, FTP is by nature an insecure method for transferring files. However, it can be useful when making files available to multiple users, or when working in a secure and private network.

This guide will show you how to configure and install an FTP server using VSFTPD on CentOS 7.

installing FTP on CentOS tutorial

Prerequisites

  • Access to a user account with sudo privileges
  • The yum package manager, installed by default
  • A text editor of your choice

Install FTP Server on CentOS 7

Step 1: Install FTP Service with VSFTPD

  1. Start by updating the package manager:
sudo yum update

Allow the process to complete.

This guide uses the VSFTPD (VSFTPD stands for “Very Secure FTP Daemon software package”). It’s a relatively easy software utility to use for creating an FTP server .

  1. Install VSFTPD software with the following command:
sudo yum install vsftpd

When prompted, type Y to allow the operation to complete.

Terminal command to install vsftpd on CentOS.

  1. Start the service and set it to launch when the system boots with the following:
sudo systemctl start vsftpd
sudo systemctl enable vsftpd

This image shows how to start and enable the vsftpd service upon install.

  1. Next, create a rule for your firewall to allow FTP traffic on Port 21:
sudo firewall-cmd --zone=public --permanent --add-port=21/tcp
sudo firewall-cmd --zone=public --permanent --add-service=ftp
sudo firewall-cmd –-reload

Once vsftpd is installed, configure the firewall to allow traffic on Port 21.

Note: If you use a different firewall application, refer to the documentation to configure it correctly for Port 21. Also, some FTP clients use Port 20, so you may wish to include that rule as well. Simply copy the first line, and replace 21 with 20.

To continue click below