CentLinux | Learn How to Install CentOS/Rocky Linux Servers

Thursday, February 13, 2020

How to Install Anonymous FTP server on CentOS 8

Install Anonymous FTP server on CentOS 8

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.

In this lab, we will install and configure Anonymous FTP Server on CentOS 8.

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

 

This Article Provides:

Install Anonymous FTP server on CentOS 8 

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 – ftp-server.centlinux.com
  • IP Address - 192.168.116.206 /24

 

Installing 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.

anonymous_enable=YES

Enable and start FTP service.

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

 

Connecting 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.

If you find this article useful? Consider supporting us by Buy Me A Coffee


No comments:

Post a Comment

© 2023 CentLinux. All Rights Reserved.