ProFTPD Setup Guide on Debian 12 Bookworm

In this article, we want to show you the ProFTPD Setup Guide on Debian 12 Bookworm. ProFTPD is a free FTP server that is fast, secure, and configurable. It is widely used in Linux and Unix systems and it has amazing features like virtual hosting, modular architecture, advanced security, and user-based access controls.

Steps To ProFTPD Setup Guide on Debian 12 Bookworm

To complete this guide, you must have access to your server as a non-root user with sudo privileges and set up a basic firewall. To do this, you can follow this guide on Initial Server Setup with Debian 12 Bookworm.

Now follow the steps below to start your ProFTPD setup.

Step 1 – Install ProFTPD Server on Debian 12

The packages for ProFTPD are available in the default Debian 12. To install it, first, run the system update with the following command:

sudo apt update

Then, use the following command to install the ProFTPD server:

sudo apt install proftpd -y

Step 2 – Start ProFTPD Server on Debian 12 Bookworm

When your installation is completed, you must start and enable your ProFTPD service. To start the service, run the following command:

sudo systemctl start proftpd

To enable the service to start on the boot system, run the following command:

sudo systemctl enable proftpd

Now verify ProFTPD server is active and running on Debian 12 with the following command:

sudo systemctl status proftpd
Output
● proftpd.service - ProFTPD FTP Server
     Loaded: loaded (/lib/systemd/system/proftpd.service; enabled; preset: enab>
     Active: active (running) since Thu 2023-09-21 04:39:41 EDT; 29s ago
       Docs: man:proftpd(8)
   Main PID: 811 (proftpd)
      Tasks: 1 (limit: 4653)
     Memory: 2.0M
        CPU: 57ms
     CGroup: /system.slice/proftpd.service
...

Step 3 – Configure UFW Firewall Rules for the ProFTPD Server

At this point, you must allow the ProFTPD port through your UFW firewall. You can verify the ProFTPD listening port which is port 21 with the command below:

sudo ss -antpl | grep proftpd
Output
LISTEN 0      128                *:21              *:*    users:(("proftpd",pid=811,fd=0))

Next, allow port 21 through your firewall with the following command:

sudo ufw allow 21/tcp

To apply the new rules, reload the firewall:

sudo ufw reload

Also, you can read the following UFW guide on Debian 12:

Configure Firewall with UFW on Debian 12 Bookworm

Step 4 – Create a Dedicated User for the ProFTPD Server

At this point, you can create a dedicated user for testing your ProFTPD server. To do this, you can run the following command with your desired name:

sudo adduser ftpuser

Then, switch to your ProFTPD user on Debian 12:

su - ftpuser

Next, create some testing files with the following command:

# mkdir folder1 folder2
# touch testing1 testing2

Now exit from your ProFTPD user and proceed to the following steps.

exit

Step 5 – ProFTPD Server Configuration on Debian 12 Bookworm

At this point, you must edit the ProFTPD server config file and change some default settings. To do this, open the /etc/proftpd/proftpd.conf file with your desired text editor. Here we use the vi editor:

sudo vi /etc/proftpd/proftpd.conf

At the file, search for the ServerName directive and change it to your server’s hostname.

ServerName "server's hostname"

Add the following content at the end of the file:

<Directory /home/ftpuser>
  Umask 022
  AllowOverwrite off
  <Limit LOGIN>
    AllowUser ftpuser
    DenyAll
  </Limit>
  <Limit ALL>
    AllowUser ftpuser
    DenyAll
  </Limit>
</Directory>

When you are done, save and close the file.

To apply the changes, restart the ProFTPD service on Debian 12:

sudo systemctl restart proftpd

For more example configuration, you can visit this link.

Step 6 – Access ProFTPD Server Via Linux Terminal

At this point, you can connect to your ProFTPD server via the Linux terminal. To do this, you can use the FTP command with your ProFTPD server’s IP address:

ftp ftp-server-ip

Enter the ProFTPD user you have created:

Connected to ...
220 ProFTPD Server (deb.book) [::ffff:...]
Name (...:root): ftpuser

You will be asked to enter the user’s password, then you will see your FTP shell:

Password: password
230 User ftpuser logged in
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

Then, you can verify that you have access to your ProFTPD server files by checking the files you have created:

ftp> ls
Output
drwxr-xr-x   2 ftpuser  ftpuser      4096 Sep 21 08:44 folder1
drwxr-xr-x   2 ftpuser  ftpuser      4096 Sep 21 08:44 folder2
-rw-r--r--   1 ftpuser  ftpuser         0 Sep 21 08:44 testing1
-rw-r--r--   1 ftpuser  ftpuser         0 Sep 21 08:44 testing2

Conclusion

At this point, you have learned this ProFTPD Setup Guide on Debian 12 Bookworm and learned to configure it and access the ProFTPD server via a Linux remote machine from the terminal.

Hope you enjoy it. You may be interested in these articles:

Set up ProFTPD on AlmaLinux 9

How To Enable FTP Server on WHM

Set up SFTP Server on Ubuntu 22.04

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!