vsftpd.conf Configuration Guide – Essential Directives and Secure FTPS Template
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.
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=NOdisables anonymous logins;local_enable=YESpermits local UNIX accounts;userlist_enable=YES+userlist_deny=NOrestricts logins strictly to accounts listed in/etc/vsftpd.userlist. - File permissions & uploads:
write_enable=YESallows uploads, deletes, and renames;local_umask=022sets sensible default file permissions (644 files / 755 folders). - Chroot isolation:
chroot_local_user=YESlocks users inside their home directory;allow_writeable_chroot=YESprevents 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 specifypasv_address=YOUR.PUBLIC.IPif the server sits behind NAT. - TLS / FTPS encryption: point
rsa_cert_fileandrsa_private_key_fileto your Let’s Encrypt certificate, disable legacy SSLv2/SSLv3 (ssl_sslv2=NO,ssl_sslv3=NO), and enforce TLS withssl_tlsv1=YES. - Logging & limits: enable
xferlog_enable=YESandvsftpd_log_file=/var/log/vsftpd.logto track transfers, and cap load withmax_clients,max_per_ip, andlocal_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.
