In our last tutorial on File Sharing, we discussed Network File System (NFS). Now, we will learn to install FTP (aka SFTP or Very SecureFTP) in this tutorial. But first, we must know what is FTP

The File Transfer Protocol (FTP) is a standard network protocol used to transfer computer files between a client and server on a computer network. It is built on a client-server model architecture and uses separate control and data connections between the client and the server.

Recommended Read: Simple Linux Backups with Rsync command

Also Read: Essential Linux Commands You Should Know

Since FTP is rather insecure, we must either use our FTP over SSL/TLS or we can use the best alternative to FTP i.e. VSFTP. It's designed to have the strongest protection against FTP vulnerabilities & can be used to share data globally.


Install FTP on Linux

VSFTP can be installed using the following command on Centos/RedHat

# yum install vsftpd -y
# yum install ftp -y                                                                          (to connect to server)


Configuration

One thing to consider after installing VSFTP is that if we want anonymous-login on our ftp or not.

Firstly, we will discuss how to configure with anonymous disabled & later we will also discuss enabling anonymous-login. Now, let's move on to configuring VSFTP. Open configuration file for vsftp

# vi /etc/vsftpd/vsftpd.conf

then disable anonymous access, change the following parameter to no

anonymous_enable=NO

and change the following parameter to yes

local_enable=YES

Then, restart the server to implement changes

# service vsftpd restart
# chkconfig vsftpd on

That’s it, our secure FTP is ready. Now let's try to access it


Accessing FTP

Accessing VSFTP through the browser

ftp://192.168.1.100                 or                         ftp://ftp.linux.com

Accessing VSFTP through Command line

ftp://192.168.1.100

To use VSFTP in the Command line, use the following commands

get filename                                                          to download a file
put filename                                                          to upload a file
bye                                                                              to exit/quit ftp

So this completes our tutorial on how to install FTP on Linux, next up is configuring FTP anonymous access 'enabled'. If having any queries/comments, use the comment box down below.

If you think we have helped you or just want to support us, please consider these:-

Connect to us: Facebook | Twitter

Linux TechLab is thankful for your continued support.