How to setup Anonymous FTP Server on CentOS 8

Share on Social Media

In this article, you will learn how to setup Anonymous FTP Server on CentOS 8. #centlinux #linux #ftp

What is Anonymous FTP Server?

FTP (File Transfer Protocol) is used to transfer computer files between client and servers on a computer network. FTP users can authenticate themselves with a username/password, but FTP users can also connect anonymously, if the FTP server is configured to allow it.

Here, configurations are performed through Linux CLI (Command Line Interface). Therefore, we strongly recommend you should read The Linux Command Line, 2nd Edition (PAID LINK) by William Shotts, to develop a strong understanding of Linux CLI.

Environment Specification:

We are using a CentOS 8 minimal virtual machine with following specification.

  • CPU – 3.4 Ghz (2 cores)
  • Memory – 2 GB
  • Storage – 20 GB
  • Operating System – CentOS 8.0
  • Hostname โ€“
  • IP Address – /24

Install vsftpd on CentOS 8:

We are installing vsftpd package to configure a FTP services on our Linux server.

# dnf install -y vsftpd

Allow anonymous access to FTP server by editing vsftpd configuration file.

# vi /etc/vsftpd/vsftpd.conf

Find and set following directive in this file.


Enable and start FTP service.

# systemctl enable --now vsftpd.service
Created symlink /etc/systemd/system/ รข /usr/lib/systemd/system/vsftpd.service.

Connect with Anonymous FTP Server:

To connect to an FTP server, we need a FTP client.

There are many free FTP clients available on the Internet and in CentOS 8 yum repository.

We are installing lftp (A sophisticated FTP Client) to connect with our server.

# dnf install -y lftp

Connect with FTP Server anonymously using lftp command.

# lftp ftp-server
lftp ftp-server:~> ls
drwxr-xr-x    2 0        0              24 Feb 10 15:54 pub

Download a file from the Server.

lftp ftp-server:/> cd pub
lftp ftp-server:/pub> get cacert.p12
12354 bytes transferred

Exit from lftp client.

lftp ftp-server:/pub> exit

We have successfully installed and configured Anonymous FTP Server on CentOS 8.


In this article, you have learned how to setup Anonymous FTP Server on CentOS 8.