Hostwinds Tutorials

Search results for:


Table of Contents


How To Install ProFTPd On Debian 9
How To Configure Virtual Users and Directories
How To Configure The ProFTPd Config File To Lock Each User In Their Directory

Install ProFTPD (Debian 9)

Tags: Debian 

How To Install ProFTPd On Debian 9
How To Configure Virtual Users and Directories
How To Configure The ProFTPd Config File To Lock Each User In Their Directory

This guide will walk you through ProFTPd server installation and configuration, showing you how to customize your FTP server's actions by walking you through ProFTPd configuration.

How To Install ProFTPd On Debian 9

Step 1: SSH into your Debian Installation

Step 2: Install Updates

apt-get update

Step 3: Install Proftpd

apt-get install proftpd

How To Configure Virtual Users and Directories

Step 1: First, we need to add a line to the /etc/shells file

nano /etc/shells

Step 2: Then add the following line at the bottom

/bin/false

Step 3: Create the FTP directory

cd /home
mkdir /home/FTP

The FTP directory can be called anything you wish, but for now, we will call it FTP

Step 4: Create the directory for your virtual user

mkdir /home/FTP/

Replace \ with what you would like your virtual user to be called

Step 5: Create the FTP virtual user

useradd -p -d /home/FTP/ -s /bin/false

Replace \ with what you would like your virtual user to be called and replace \ with your desired password

Step 6: Make sure to change the permissions of the file to 777

chmod 777 FTP

How To Configure The ProFTPd Config File To Lock Each User In Their Directory

If you're going to have multiple users, don't forget to add those directories into the FTP directory.

Step 1: Setting the default root directory

nano /etc/proftpd/proftpd.conf

Step 2: Uncomment the DefaultRoot option. It will look like this at first

#DefaultRoot                                 ~

Please set it to this

DefaultRoot                                  /home/FTP

Step 3: Set the directory per virtual user. At the bottom of this configuration file, add these lines.

\<Directory /home/FTP/

DenyALL
AllowUser <username>
<Directory /home/FTP/
DenyALL
AllowUser <username>

Be sure to do this with each user.

Be sure to replace \ with the user(s) you created previously

Step 4: Starting the ProFTPd service

/etc/init.d/proftpd start

Written by Hostwinds Team  /  June 8, 2018