Introduction

vsftpd (Very Secure FTP Daemon) is a lightweight and secure FTP server software for Unix-like systems. This guide will walk you through the process of installing and configuring a secure FTP server with vsftpd on Debian 12.

Prerequisites

Before you begin, ensure you have:

  1. A Debian 12 server or desktop system
  2. Root or sudo privileges

Step 1: Install vsftpd

Update the package index and install vsftpd:

sudo apt update
sudo apt install -y vsftpd

Step 2: Configure vsftpd

Edit the vsftpd configuration file:

sudo nano /etc/vsftpd.conf

Uncomment or add the following lines to the configuration file:

listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
chroot_local_user=YES
allow_writeable_chroot=YES

Step 3: Restart vsftpd Service

Restart the vsftpd service to apply the changes:

sudo systemctl restart vsftpd

Step 4: Allow FTP Traffic in Firewall

If you have a firewall enabled, allow FTP traffic:

sudo ufw allow ftp

Step 5: Create FTP User

Create a system user for FTP access:

sudo adduser ftpuser

Set a password for the FTP user when prompted.

Step 6: Test FTP Connection

Use an FTP client to connect to your server using the FTP user credentials.

Conclusion

Congratulations! You have successfully installed and configured a secure FTP server with vsftpd on Debian 12. You can now securely transfer files to and from your server using FTP.

Was this answer helpful? 0 Users Found This Useful (0 Votes)