How to setup FTP server in Fedora Linux?

FTP or File Transfer Protocol is a standard networking protocol used to transfer files between client and server. FTP is often secured with the SSL/TLS(FTPS) for the secure transmission of data or replaced with SSH File Transfer Protocol(SFTP).

VSFTPD stands for “Very Secure File Transfer Protocol Daemon” which is a type of FTP server that is comparatively more secure. So it is a popular choice for Linux users.

As I already discussed how to set up the FTP server on Ubuntu Linux.

Today in this article, we are going to discuss steps to set up an FTP server in Fedora Linux.

How to install vsftpd in Fedora

Before installing a package on your system make sure the Fedora package repository is updated –

sudo dnf update

Now to install vsftpd in Fedora run –

sudo dnf install vsftpd

If it asks for your confirmation type y and then hit the Enter key.

You can verify the installation by using the given command –

vsftpd -v

vsftpd version

Start and enable vsftpd

Once the package is installed on your system use the given command to start the FTP server on your system –

sudo systemctl start vsftpd

Next, enable vsftpd so that it boots automatically when the system restart –

sudo systemctl enable vsftpd

Check the status of vsftpd

Use the following command to check the status of the FTP server –

sudo systemctl status vsftpd

status vsftpd

Configuring the vsftpd server on Fedora

You can configure the vsftpd server by editing  /etc/vsftpd/vsftpd.conf file. For the secure implementation of the vsftpd server, we have to add/modify some options inside the vsftpd configuration file.

Backup the existing configuration

Before making any changes to the configuration file, It is good to take the backup of the original file.

Use the following command –

sudo cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.orig

Editing the configuration file

Open the configuration file in a text editor by using the following command –

sudo nano /etc/vsftpd/vsftpd.conf

Modify the file values as given below. This will be sufficient for a basic FTP server, you can modify it later as per your needs –


Adjust the firewall settings

You need to adjust the firewall settings you can do this by running –

sudo firewall-cmd --add-service=ftp --perm
sudo firewall-cmd --add-port=40000-40001/tcp --perm
sudo firewall-cmd --reload

Restart the vsftpd server

Once you are done with the configuration press Ctrl+s to save and Ctrl+x to exit from the editor. Use the following command to restart your FTP server so that all changes take place –

sudo systemctl restart vsftpd

Secure FTP Server with TLS

TLS or Transport Layer Security is a security protocol it is designed to facilitate privacy and data security in communications over the internet. By default, FTP is not encrypted, the data transmitted can be intercepted so we need to use TLS with FTP.

Let’s create a certificate by using the OpenSSL tool.

First Create the following directory to store the SSL/TLS certificate and key files –

sudo mkdir -p /etc/ssl/vsftpd

Now generate a self-signed SSL/TLS certificate and private key using the given command –

sudo openssl req -x509 -nodes -keyout /etc/ssl/vsftpd/vsftpd.pem -out /etc/ssl/vsftpd/vsftpd.pem -days 365 -newkey rsa:2048

This will ask for the given information –

create private key

Open the vsftpd configuration file by using –

sudo nano /etc/vsftpd/vsftpd.conf

Here add or modify the given lines –

# Enable SSL
#Add rsa certificate file
# Disable anonymous user from using the SSL

Save the file by pressing Ctrl+s and exit from the editor by pressing Ctrl+x.

Now you need to restart the FTP server to make changes effective –

sudo systemctl restart vsftpd

Accessing FTP server

Now your FTP server is ready you can access it by using an FTP client. For example in Filezilla enter the hostname or IP address of the server, username, and password and click on Quickconnect to connect with the server.

While connecting first it will display a window of an unknown certificate click on the checkbox of always trust certificate in future sessions and then click on ok.

Now the TLS is configured with the FTP server you can communicate with the FTP server securely.


Now I hope you have successfully set up the FTP server on your Fedora system. If you have a query or feedback then write us in the comments below.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Exit mobile version