You can Watch all our Tutorials and Training Videos on our YouTube Channel for Free! Subscribe Now! & Free Web Tools available on

How to Set Up an FTP Server on CentOS 7

How to Set Up an FTP Server on CentOS 7, ftp server centos, ftp server, linux ftp server, install ftp server linux, setup linux ftp server, DevOps
How to Set Up an FTP Server on CentOS 7

Setting up an FTP server on CentOS 7 is a straightforward process that can be completed in just a few steps. File Transfer Protocol (FTP) is a popular protocol used to transfer files between systems. It is commonly used in web development to upload and download files to and from a web server.

In this article, we will guide you through the process of setting up an FTP server on CentOS 7.

Before we begin, ensure that you have a CentOS 7 server up and running with root access.

Step 1: Install vsftpd

The first step is to install vsftpd, a lightweight and secure FTP server for Unix-like systems. To install vsftpd, run the following command:

sudo yum install vsftpd

Step 2: Configure vsftpd

After installing vsftpd, the next step is to configure it. Open the vsftpd configuration file using your favorite text editor:

sudo vi /etc/vsftpd/vsftpd.conf

Uncomment the following lines to allow anonymous FTP access:


To restrict anonymous FTP access, change the following line:




Save and exit the configuration file.

Step 3: Configure Firewall

If you have enabled the firewall on your server, you need to allow FTP traffic through the firewall. Run the following command to open the FTP port (port 21):

sudo firewall-cmd --add-port=21/tcp --permanent
sudo firewall-cmd --reload

Step 4: Start vsftpd

The last step is to start the vsftpd service:

sudo systemctl start vsftpd
sudo systemctl enable vsftpd

Congratulations! You have successfully set up an FTP server on your CentOS 7 server.

Additional Tips

  • To create new FTP users, run the following command:
sudo useradd -m ftpuser
sudo passwd ftpuser
  • To change the default FTP directory, modify the following line in the vsftpd configuration file:


  • To allow FTP access for a specific user, modify the following line in the vsftpd configuration file:



Then, create a userlist file and add the allowed users:

sudo vi /etc/vsftpd/user_list

Add the username to the userlist file:


Save and exit the file.

Related Searches and Questions asked:

  • Setting up an FTP Server on Linux RHEL 8
  • Setting up an FTP Server on CentOS 8
  • Setting up Linux FTP Server on Debian
  • Setting Up an FTP Server on Linux RHEL 7
  • That's it for this post. Keep practicing and have fun. Leave your comments if any.

    Post a Comment

    Cookie Consent
    We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
    It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
    AdBlock Detected!
    We have detected that you are using adblocking plugin in your browser.
    The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
    Site is Blocked
    Sorry! This site is not available in your country.