Install and Configure an FTP Server (Pro-FTPD) On Ubuntu 18.04, 19.04 LTS in 5 Minutes

When transferring files to a remote server, FTP is still one of the easiest ways to do it. Especially, when you’re in a web project; You have to provide FTP access to others but not SSH or Admin panel access. Let’s setup FTP server on Ubuntu 18.04, 19.04.

Note – You should replace red colour string with your information

ProFTPd is a powerful FTP server program. It is very easy to configure as well. In this article, I am going to show you how to setup an FTP server with ProFTPd on Ubuntu 19.04 LTS (Tested with 18.04). So, let’s get started.

Requirements

  1. Ubuntu 19.04 / Ubuntu 18.04 or Debian 9
  2. The password of the root account
  3. Port Number: 21

Install ProFTPd server

Of course, you need to install the software in order to use it. First, make sure that all your system packages are up-to-date by running these following apt commands (apt-get) in the terminal. Open your terminal or Putty and connect to your server and follow me 😉

$ sudo apt update -y
$ sudo apt upgrade -y

I used -y flag to bypass the confirmation step.

Now to install ProFTPD server, run in the terminal.

$ sudo apt install proftpd -y

During the installation, you should get a prompt with the message below: Select standalone.
(This message may or may not popup. Don’t worry if not)

After installing ProFTPD, start ProFTPD service and enable it to start on boot time with the following command:

$ sudo systemctl start proftpd
$ sudo systemctl enable proftpd

When enabling proftpd, the system might ask the root password.

ProFTPd Server Configuration

You can find the configuration folder from /etc/proftpd . Let’s navigate to the folder and open up the configuration file.

cd /etc/proftpd
$ sudo nano proftpd.conf

Basically, this default configuration is good to go but if you want to change the port and IPv6 capability. Feel free to go ahead and do those changes but you should know what you are doing.

Create FTP Group and User

If you are creating this FTP login for pre-installed stacks like LAMP you can skip group creation part. To find an existing folder group simply run ls -l command to find the group name. (‘www-data’ is the default group for the LAMP stack)

Create a group with the name of your choice. In this article, we will use “ftpgroup” and “ftpuser” as a group name and username respectively. create a group by executing the following command.

$ sudo addgroup ftpgroup

Let’s create the user.

-shell /bin/false will disable SSH access for this user. If you need to enable SSH for the user, use -shell /bin/bash

Make sure to provide full folder path to -home flag.

$ sudo adduser ftpuser -shell /bin/false -ingroup ftpgroup -home path/to/ftpshare
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for ftpuser
Enter the new value, or press ENTER for the default
Full Name []: varuna
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y

Fill your new password for the FTP user and add a Name. I skipped other information by pressing the enter key and confirmed the information.

There is another step to allow our new user to upload/edit files :

$ sudo chmod -R g+rw path/to/ftpshare

For those who having login problems with their servers (530 Login incorrect) , add

RequireValidShell off

to your to your proftpd.conf file

All set 😃 now you can use your favorite FTP client to test things. Feel free to ask any questions in the comment section. I’m glad to hear from you.

 

0 0 vote
Article Rating
Subscribe
Notify of
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
IKTeam
IKTeam
6 months ago

For those having login problems with their servers, add RequireValidShell off to your proftpd.conf file

2
0
Would love your thoughts, please comment.x
()
x