TECH / Серверы и сайты 3 min read

vsftpd.conf Configuration Guide – Essential Directives and Secure FTPS Template

NEMCD Author
Published Jun 15, 2008 · 3 min

When configuring vsftpd (Very Secure FTP Daemon) on Linux or FreeBSD, having a clean cheat sheet of the most important vsftpd.conf directives saves hours of digging through man pages – especially for TLS encryption, chroot jails, and passive firewall ports.

vsftpd FTP server configuration guide and vsftpd.conf reference

Below is a clean, production-friendly vsftpd.conf starter template followed by a quick reference of the key options every admin uses.

Secure Starter Template for /etc/vsftpd.conf (FTPS + Chroot)

For local system users uploading files inside their own home directory with anonymous logins disabled:

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
chroot_local_user=YES
allow_writeable_chroot=YES
pasv_enable=YES
pasv_min_port=40000
pasv_max_port=40100
ssl_enable=YES
force_local_logins_ssl=YES
force_local_data_ssl=YES

Security reminder: plain FTP sends credentials in cleartext. Always enable FTPS (ssl_enable=YES) with a valid TLS certificate – or use SFTP over SSH whenever legacy FTP is not strictly required. If you hit 500 OOPS: refusing to run with writable root inside chroot, check our dedicated vsftpd chroot fix.

Core vsftpd.conf Directives Quick Reference

  • Access control: anonymous_enable=NO disables anonymous logins; local_enable=YES permits local UNIX accounts; userlist_enable=YES + userlist_deny=NO restricts logins strictly to accounts listed in /etc/vsftpd.userlist.
  • File permissions & uploads: write_enable=YES allows uploads, deletes, and renames; local_umask=022 sets sensible default file permissions (644 files / 755 folders).
  • Chroot isolation: chroot_local_user=YES locks users inside their home directory; allow_writeable_chroot=YES prevents the 500 OOPS error when the chroot root is writable.
  • Passive mode behind NAT/firewalls: set pasv_enable=YES, open a fixed port range (pasv_min_port / pasv_max_port) in your firewall, and specify pasv_address=YOUR.PUBLIC.IP if the server sits behind NAT.
  • TLS / FTPS encryption: point rsa_cert_file and rsa_private_key_file to your Let’s Encrypt certificate, disable legacy SSLv2/SSLv3 (ssl_sslv2=NO, ssl_sslv3=NO), and enforce TLS with ssl_tlsv1=YES.
  • Logging & limits: enable xferlog_enable=YES and vsftpd_log_file=/var/log/vsftpd.log to track transfers, and cap load with max_clients, max_per_ip, and local_max_rate (bytes/sec).

After editing /etc/vsftpd.conf, restart the daemon with systemctl restart vsftpd and test an explicit TLS connection from FileZilla or WinSCP to verify both authentication and passive data channels.

Related posts:

Leave a Comment