How to install an ftp server on ubuntu 20. 04

How to install an FTP server on Ubuntu 20.04

FTP is a protocol that allows us to transfer files between two different servers across a network. It happens between a “server” and a “client” computer. It occurs via ports 20 and 21. Port 21 is used to establish a link between two computers, and port 20 is used to transfer data. At the same time, FTP servers may not be as prominent as they have ever been. They can still be quite helpful, particularly when they are used on the intranet.Companies with an intranet for everyday work have an FTP server that is open to installed files for everyone, and this is simple to do in Ubuntu 20.04.

Sponsored

This post is covering what the FTP server is and how to install it on Ubuntu 20.04.

Installing FTP server:

Updating Your system:

Run the command given below to update system repositories:

$ sudo apt get update

How to install an ftp server on ubuntu 20. 04 1

How to install an ftp server on ubuntu 20. 04 2

How to install vsftpd (FTP Server):

Firstly, we need to get vsftpd. The “vsftpd” is an FTP server that is secure, fast, and convenient for Linux systems.

Run the command given below:

$ sudo apt install vsftpd

How to install an ftp server on ubuntu 20. 04 3

How to install an ftp server on ubuntu 20. 04 4

By default, it will start like all services in Debian.

Checking the status of vsftpd:

Once installed, vsftpd (FTP Server), run the command to check the status if it is running or not:

$sudo service vsftpd status

How to install an ftp server on ubuntu 20. 04 5

How to install an ftp server on ubuntu 20. 04 6

It shows “FTP server is running correctly.

Configuring FTP server:

All VSFTPD configurations are in the /etc/vsftpd.conf file, so it is easy to create a backup of it before changing it. If something unexpected happens, we can go back to the original and undo any mistakes.

Use the command given command to make a backup:

$ sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.bak

Type all the comments systematically.

Let’s begin by actively listening to the server.

Type listen =YES

If you do not use IPv6, then it must be disabled:

listen_ipv6=No

Also, it is not appropriate to give access to an anonymous user:

anonymous_enable=NO

By default, the client can only download the file, so let it remain active:

local_enable=YES

write_enable=YES

FTP operates at port 20:

connect_from_port_20=YES.

Sponsored

The listen port can be changed:

listen_port=XX

Save changes by pressing “CTRL+o” and close the file by pressing “CTRL+ x”.

The terminal will look like this.

How to install an ftp server on ubuntu 20. 04 7

Type the mentioned command to view the file without comments:

$ sudo cat /etc/vsftpd.conf | grep –v “^#”

How to install an ftp server on ubuntu 20. 04 8

Creating a new user:

Execute the command shown below to create a new user for the configuration of the server:

$ sudo useradd –m user1

How to install an ftp server on ubuntu 20. 04 9

It will ask you to assign a password. Enter password:

How to install an ftp server on ubuntu 20. 04 10

Again, enter the password for confirmation. Your password has been updated.

How to install an ftp server on ubuntu 20. 04 11

The user has created successfully on the FTP server.

Configure FTP server on Ubuntu 20.04:

We have two ways to configure the FTP server:

  • Configure through terminal
  • Configure through browser

We need an IP address to configure the server; check your IP address through the following command:

$ ifconfig

How to install an ftp server on ubuntu 20. 04 12

Configure through terminal:

Fire up the terminal and give access to it with Server’s IP address:

$ ftp 10.0.2.15

How to install an ftp server on ubuntu 20. 04 13

Configure through Browser:

Open the browser and give access to the FTP server. The following address is:

ftp://10.0.2.15

Once the connection is established, you will be asked to enter your username and password:

How to install an ftp server on ubuntu 20. 04 14

After entering the credentials, click on “OK”, a connection will be established.

Conclusion:

FTP (File transfer protocol) is a software application that allows us to send files from one system to another through the internet. It is a well-recognized protocol. One system act as a server to preserve the information, and the other acts as a client which sends or requests files from the server. Through this post, we understood how to install an FTP server and how to configure it via terminal and browser on Ubuntu 20.04.


Discover more from Ubuntu-Server.com

Subscribe to get the latest posts sent to your email.

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply