File Transfer Protocol (FTP) Server Build

Published on July 29, 2022 at 11:41 pm by LEW

Introduction

In this post we will add File Transfer Protocol (FTP) to our Server. FTP will provide an easy way to get get files on and off a server via the Local Area network (LAN).

In a previous post of this series we created a simple UPnP server. Initially I used a USB key to get media files onto the server. Later I did it using secure copy (scp) from the command line. FTP will allow us to use a FTP client program, where we can drag and drop from client to server using a Graphical User Interface (GUI).

I will note again that FTP is not a secure protocol, and should only be used on your private LAN. There is a more secure FTP protocol, which we may discuss in a latter post.

We will be installing a FTP server program called vstftpd on the server we have been working on in this series of posts. It is fast and light weight, and does not require to much in the way of configuration. If you have not read the earlier posts (starting here), I suggest you do.

Installation

As before, to install programs you need to either be root or have sudo privileges. Also remember to update and upgrade to before installing (apt update, apt install). Once you are done we can install and check vsftpd with the following command.

apt install vsftpd
systemctl status vsftpd

The vsftpd program should have started upon install.

FTP Server Configuration

Users: Basic FTP has what is known as an anonymous user. We want to turn that off and limit who can use the FTP service to existing users. Further we want to limit those users to their home directory. To do this we need to edit the /etc/vsftpd.conf file.

In the default configuration file, we find anonymous_enabled=NO, which is what we want. We also find local_enable=YES, which allows users with accounts on the server to log in.

What we do not find is write_enable=YES. Technically it is there, but it is commented out. So we need to un-comment the line.

The vsftp.conf file is fairly well documented, and it is worth looking through the options there. The one change we made will allow us to use FTP to transfer files to our server.

FTP Client Programs

You can do FTP from the command line, but that sort of defeats the purpose of running a FTP Server (being about the same level of effort as scp).

There are several graphical clients you can use. Here are a couple I have some familiarity with; Filezilla, Cyberduck, and CrossFTP.

Making the Connection

Once you have installed and started your FTP Client program, you will need to configure a connection. FTP communicates over port 21 and sends data on part 20 (and we did not change that).

You will need the IP address, port number, user name, and user password. Most GUI FTP clients allow you to save a connection once it is configured.

Once you have entered the information, you can go ahead and connect. Once you have connected, the home directory should be displayed on one side of the FTP window, and your computer on the other side. Just drag files form one pane to the other, and the program should take care of the rest.

Conclusion

In this post we did a quick install of an FTP server program. While un-secure, it gives us the capabilities to quickly transfer media files to our media server.

We will discuss other methods of transferring files in future posts.

Part 1 Media Servers and Clients

Part 2 Universal Plug and Play (UPnP) Server

Part 3 Using Secure Copy Protocol (scp) on a Server

Part 4 File Transfer Protocol (FTP) Server Build

Part 5 Samba (SMB) Server Setup for Media Server

Part 6 Kodi Media Client setup

Add New Comment

Your email address will not be published. Required fields are marked *