VSFTPD.CONF(5)

✨ NAME ✨

vsftpd.conf (5) β€” the config file for vsftpd, bestie. It's literally the vibe control panel for how vsftpd behaves.


πŸ’… DESCRIPTION πŸ’…

Okay so vsftpd.conf is what you use to control all the little aspects of how vsftpd acts. By default, vsftpd looks for this file at /etc/vsftpd.conf. But you can override that by passing a command line argument to vsftpd β€” that argument is the pathname of the config file. This is lowkey useful because you might wanna use an advanced inetd like xinetd to launch vsftpd with different config files on a per virtual host basis. Main character energy, honestly.


πŸŽ€ FORMAT πŸŽ€

The format of vsftpd.conf is super simple, no cap. Each line is either a comment or a directive. Comment lines start with a # and are ignored. A directive line has this format:

option=value
It is important to note that it is an error to put any space between the option, = and value. Like, do not do that. Periodt.

Each setting has a compiled in default which may be modified in the configuration file.


πŸ‘‘ BOOLEAN OPTIONS πŸ‘‘

Below is a list of boolean options. The value for a boolean option may be set to YES or NO. Let's get into it, bestie. 🫢

  • allow_anon_ssl β€” Only applies if ssl_enable is active. If set to YES, anonymous users will be allowed to use secured SSL connections. Default: NO
  • anon_mkdir_write_enable β€” If set to YES, anonymous users will be permitted to create new directories under certain conditions. For this to work, the option write_enable must be activated, and the anonymous ftp user must have write permission on the parent directory. Default: NO
  • anon_other_write_enable β€” If set to YES, anonymous users will be permitted to perform write operations other than upload and create directory, such as deletion and renaming. This is generally not recommended but included for completeness. Default: NO
  • anon_upload_enable β€” If set to YES, anonymous users will be permitted to upload files under certain conditions. For this to work, the option write_enable must be activated, and the anonymous ftp user must have write permission on desired upload locations. This setting is also required for virtual users to upload; by default, virtual users are treated with anonymous (i.e. maximally restricted) privilege. Default: NO
  • anon_world_readable_only β€” When enabled, anonymous users will only be allowed to download files which are world readable. This is recognising that the ftp user may own files, especially in the presence of uploads. Default: YES
  • anonymous_enable β€” Controls whether anonymous logins are permitted or not. If enabled, both the usernames ftp and anonymous are recognised as anonymous logins. Default: NO
  • ascii_download_enable β€” When enabled, ASCII mode data transfers will be honoured on downloads. Default: NO
  • ascii_upload_enable β€” When enabled, ASCII mode data transfers will be honoured on uploads. Default: NO
  • async_abor_enable β€” When enabled, a special FTP command known as "async ABOR" will be enabled. Only ill advised FTP clients will use this feature. Additionally, this feature is awkward to handle, so it is disabled by default. Unfortunately, some FTP clients will hang when cancelling a transfer unless this feature is available, so you may wish to enable it. Default: NO
  • background β€” When enabled, and vsftpd is started in "listen" mode, vsftpd will background the listener process. i.e. control will immediately be returned to the shell which launched vsftpd. Default: NO
  • check_shell β€” Note! This option only has an effect for non-PAM builds of vsftpd. If disabled, vsftpd will not check /etc/shells for a valid user shell for local logins. Default: YES
  • chmod_enable β€” When enabled, allows use of the SITE CHMOD command. NOTE! This only applies to local users. Anonymous users never get to use SITE CHMOD. Default: YES
  • chown_uploads β€” If enabled, all anonymously uploaded files will have the ownership changed to the user specified in the setting chown_username. This is useful from an administrative, and perhaps security, standpoint. Default: NO
  • chroot_list_enable β€” If activated, you may provide a list of local users who are placed in a chroot() jail in their home directory upon login. The meaning is slightly different if chroot_local_user is set to YES. In this case, the list becomes a list of users which are NOT to be placed in a chroot() jail. By default, the file containing this list is /etc/vsftpd.chroot_list, but you may override this with the chroot_list_file setting. Default: NO
  • chroot_local_user β€” If set to YES, local users will be (by default) placed in a chroot() jail in their home directory after login. Warning: This option has security implications, especially if the users have upload permission, or shell access. Only enable if you know what you are doing. Note that these security implications are not vsftpd specific. They apply to all FTP daemons which offer to put local users in chroot() jails. Default: NO
  • connect_from_port_20 β€” This controls whether PORT style data connections use port 20 (ftp-data) on the server machine. For security reasons, some clients may insist that this is the case. Conversely, disabling this option enables vsftpd to run with slightly less privilege. Default: NO (but the sample config file enables it)
  • debug_ssl β€” If true, OpenSSL connection diagnostics are dumped to the vsftpd log file. (Added in v2.0.6). Default: NO
  • delete_failed_uploads β€” If true, any failed upload files are deleted. (Added in v2.0.7). Default: NO
  • deny_email_enable β€” If activated, you may provide a list of anonymous password e-mail responses which cause login to be denied. By default, the file containing this list is /etc/vsftpd.banned_emails, but you may override this with the banned_email_file setting. Default: NO
  • dirlist_enable β€” If set to NO, all directory list commands will give permission denied. Default: YES
  • dirmessage_enable β€” If enabled, users of the FTP server can be shown messages when they first enter a new directory. By default, a directory is scanned for the file .message, but that may be overridden with the configuration setting message_file. Default: NO (but the sample config file enables it)
  • download_enable β€” If set to NO, all download requests will give permission denied. Default: YES
  • dual_log_enable β€” If enabled, two log files are generated in parallel, going by default to /var/log/xferlog and /var/log/vsftpd.log. The former is a wu-ftpd style transfer log, parseable by standard tools. The latter is vsftpd's own style log. Default: NO
  • force_dot_files β€” If activated, files and directories starting with . will be shown in directory listings even if the "a" flag was not used by the client. This override excludes the . and .. entries. Default: NO
  • force_anon_data_ssl β€” Only applies if ssl_enable is activated. If activated, all anonymous logins are forced to use a secure SSL connection in order to send and receive data on data connections. Default: NO
  • force_anon_logins_ssl β€” Only applies if ssl_enable is activated. If activated, all anonymous logins are forced to use a secure SSL connection in order to send the password. Default: NO
  • force_local_data_ssl β€” Only applies if ssl_enable is activated. If activated, all non-anonymous logins are forced to use a secure SSL connection in order to send and receive data on data connections. Default: YES
  • force_local_logins_ssl β€” Only applies if ssl_enable is activated. If activated, all non-anonymous logins are forced to use a secure SSL connection in order to send the password. Default: YES
  • guest_enable β€” If enabled, all non-anonymous logins are classed as "guest" logins. A guest login is remapped to the user specified in the guest_username setting. Default: NO
  • hide_ids β€” If enabled, all user and group information in directory listings will be displayed as "ftp". Default: NO
  • implicit_ssl β€” If enabled, an SSL handshake is the first thing expected on all connections (the FTPS protocol). To support explicit SSL and/or plain text too, a separate vsftpd listener process should be run. Default: NO
  • listen β€” If enabled, vsftpd will run in standalone mode. This means that vsftpd must not be run from an inetd of some kind. Instead, the vsftpd executable is run once directly. vsftpd itself will then take care of listening for and handling incoming connections. Default: NO
  • listen_ipv6 β€” Like the listen parameter, except vsftpd will listen on an IPv6 socket instead of an IPv4 one. Note that a socket listening on the IPv6 "any" address (::) will accept both IPv6 and IPv4 connections by default. This parameter and the listen parameter are mutually exclusive. Default: NO
  • local_enable β€” Controls whether local logins are permitted or not. If enabled, normal user accounts in /etc/passwd (or wherever your PAM config references) may be used to log in. This must be enabled for any non-anonymous login to work, including virtual users. Default: NO
  • lock_upload_files β€” When enabled, all uploads proceed with a write lock on the upload file. All downloads proceed with a shared read lock on the download file. WARNING! Before enabling this, be aware that malicious readers could starve a writer wanting to e.g. append a file. Default: YES
  • log_ftp_protocol β€” When enabled, all FTP requests and responses are logged, providing the option xferlog_std_format is not enabled. Useful for debugging. Default: NO
  • ls_recurse_enable β€” okay so when this is on, it lets peeps use ls -R. πŸ’… It's a minor security risk because an ls -R at the top level of a huge site can absolutely munch resources. 😭

Default: NO

  • mdtm_write β€” turn this on and MDTM can set file modification times (subject to the usual access checks, bestie). ✨

Default: YES

  • no_anon_password β€” when enabled, vsftpd won't even ask for an anonymous password β€” the anonymous user just logs straight in. 🫢

Default: NO

  • no_log_lock β€” when enabled, vsftpd skips taking a file lock when writing to log files. This option should generally not be enabled. It exists to workaround operating system bugs such as the Solaris / Veritas filesystem combination, which has been observed to sometimes exhibit hangs trying to lock log files. πŸ’€

Default: NO

  • one_process_model β€” if you have a Linux 2.4 kernel, you can use a different security model that only uses one process per connection. It's a less pure security model, but gains you performance. You really don't want to enable this unless you know what you are doing, and your site supports huge numbers of simultaneously connected users. πŸ‘‘

Default: NO

  • passwd_chroot_enable β€” if enabled, along with chroot_local_user, then a chroot() jail location may be specified on a per-user basis. Each user's jail is derived from their home directory string in /etc/passwd. The occurrence of /./ in the home directory string denotes that the jail is at that particular location in the path. 🧚

Default: NO

  • pasv_addr_resolve β€” set to YES if you want to use a hostname (as opposed to IP address) in the pasv_address option. 🌸

Default: NO

  • pasv_enable β€” set to NO if you want to disallow the PASV method of obtaining a data connection. πŸ¦‹

Default: YES

  • pasv_promiscuous β€” set to YES if you want to disable the PASV security check that ensures the data connection originates from the same IP address as the control connection. Only enable if you know what you are doing! The only legitimate use for this is in some form of secure tunnelling scheme, or perhaps to facilitate FXP support. πŸ”₯

Default: NO

  • port_enable β€” set to NO if you want to disallow the PORT method of obtaining a data connection. 🌈

Default: YES

  • port_promiscuous β€” set to YES if you want to disable the PORT security check that ensures that outgoing data connections can only connect to the client. Only enable if you know what you are doing! πŸ’€

Default: NO

  • require_cert β€” if set to yes, all SSL client connections are required to present a client certificate. The degree of validation applied to this certificate is controlled by validate_cert (Added in v2.0.6). πŸŽ€

Default: NO

  • require_ssl_reuse β€” if set to yes, all SSL data connections are required to exhibit SSL session reuse (which proves that they know the same master secret as the control channel). Although this is a secure default, it may break many FTP clients, so you may want to disable it. For a discussion of the consequences, see http://scarybeastsecurity.blogspot.com/2009/02/vsftpd-210-released.html (Added in v2.1.0). 😭

Default: YES

  • run_as_launching_user β€” set to YES if you want vsftpd to run as the user which launched vsftpd. This is useful where root access is not available.
MASSIVE WARNING! Do NOT enable this option unless you totally know what you are doing, as naive use of this option can create massive security problems. Specifically, vsftpd does not / cannot use chroot technology to restrict file access when this option is set (even if launched by root). A poor substitute could be to use a deny_file setting such as {/*,*..*}, but the reliability of this cannot compare to chroot, and should not be relied on. If using this option, many restrictions on other options apply. For example, options requiring privilege such as non-anonymous logins, upload ownership changing, connecting from port 20 and listen ports less than 1024 are not expected to work. Other options may be impacted.

Default: NO

  • secure_email_list_enable β€” set to YES if you want only a specified list of e-mail passwords for anonymous logins to be accepted. This is useful as a low-hassle way of restricting access to low-security content without needing virtual users. When enabled, anonymous logins are prevented unless the password provided is listed in the file specified by the email_password_file setting. The file format is one password per line, no extra whitespace. The default filename is /etc/vsftpd.email_passwords. πŸ“

Default: NO

  • session_support β€” this controls whether vsftpd attempts to maintain sessions for logins. If vsftpd is maintaining sessions, it will try and update utmp and wtmp. It will also open a pam_session if using PAM to authenticate, and only close this upon logout. You may wish to disable this if you do not need session logging, and you wish to give vsftpd more opportunity to run with less processes and / or less privilege. NOTE β€” utmp and wtmp support is only provided with PAM enabled builds. πŸ’…

Default: NO

  • setproctitle_enable β€” if enabled, vsftpd will try and show session status information in the system process listing. In other words, the reported name of the process will change to reflect what a vsftpd session is doing (idle, downloading etc). You probably want to leave this off for security purposes. πŸ‘‘

Default: NO

  • ssl_enable β€” if enabled, and vsftpd was compiled against OpenSSL, vsftpd will support secure connections via SSL. This applies to the control connection (including login) and also data connections. You'll need a client with SSL support too.
NOTE!! Beware enabling this option. Only enable it if you need it. vsftpd can make no guarantees about the security of the OpenSSL libraries. By enabling this option, you are declaring that you trust the security of your installed OpenSSL library.

Default: NO

  • ssl_request_cert β€” if enabled, vsftpd will request (but not necessarily require; see require_cert) a certificate on incoming SSL connections. Normally this should not cause any trouble at all, but IBM zOS seems to have issues. (New in v2.0.7). πŸŽ€

Default: YES

  • ssl_sslv2 β€” only applies if ssl_enable is activated. If enabled, this option will permit SSL v2 protocol connections. TLS v1.2+ connections are preferred. 🌈

Default: NO

  • ssl_sslv3 β€” only applies if ssl_enable is activated. If enabled, this option will permit SSL v3 protocol connections. TLS v1.2+ connections are preferred. 🌈

Default: NO

  • ssl_tlsv1 β€” only applies if ssl_enable is activated. If enabled, this option will permit TLS v1.0 protocol connections. TLS v1.2+ connections are preferred. 🌈

Default: NO

  • ssl_tlsv1_1 β€” only applies if ssl_enable is activated. If enabled, this option will permit TLS v1.1 protocol connections. TLS v1.2+ connections are preferred. 🌈

Default: NO

  • ssl_tlsv1_2 β€” only applies if ssl_enable is activated. If enabled, this option will permit TLS v1.2 protocol connections. TLS v1.2+ connections are preferred. 🌈

Default: YES

  • ssl_tlsv1_3 β€” only applies if ssl_enable is activated. If enabled, this option will permit TLS v1.3 protocol connections. TLS v1.2+ connections are preferred. 🌈

Default: YES

  • strict_ssl_read_eof β€” if enabled, SSL data uploads are required to terminate via SSL, not an EOF on the socket. This option is required to be sure that an attacker did not terminate an upload prematurely with a faked TCP FIN. Unfortunately, it is not enabled by default because so few clients get it right. (New in v2.0.7). 😭

Default: NO

  • strict_ssl_write_shutdown β€” if enabled, SSL data downloads are required to terminate via SSL, not an EOF on the socket. This is off by default as I was unable to find a single FTP client that does this. It is minor. All it affects is our ability to tell whether the client confirmed full receipt of the file. Even without this option, the client is able to check the integrity of the download. (New in v2.0.7). πŸ’€

Default: NO

  • syslog_enable β€” if enabled, then any log output which would have gone to /var/log/vsftpd.log goes to the system log instead. Logging is done under the FTPD facility. πŸŽ€

Default: NO

  • tcp_wrappers β€” if enabled, and vsftpd was compiled with tcp_wrappers support, incoming connections will be fed through tcp_wrappers access control. Furthermore, there is a mechanism for per-IP based configuration. If tcp_wrappers sets the VSFTPD_LOAD_CONF environment variable, then the vsftpd session will try and load the vsftpd configuration file specified in this variable. πŸ¦‹

Default: NO

  • text_userdb_names β€” by default, numeric IDs are shown in the user and group fields of directory listings. You can get textual names by enabling this parameter. It is off by default for performance reasons. 🌸

Default: NO

  • tilde_user_enable β€” if enabled, vsftpd will try and resolve pathnames such as ~chris/pics, i.e. a tilde followed by a username. Note that vsftpd will always resolve the pathnames ~ and ~/something (in this case the ~ resolves to the initial login directory). Note that ~user paths will only resolve if the file /etc/passwd may be found within the _current_ chroot() jail. 🧚

Default: NO

  • use_localtime β€” if enabled, vsftpd will display directory listings with the time in your local time zone. The default is to display GMT. The times returned by the MDTM FTP command are also affected by this option. ⭐

Default: NO

  • use_sendfile β€” bestie this one is an internal setting, like a secret little lab experiment. It's used for testing the relative benefit of using the sendfile() system call on your platform. Not really a you-thing, more a dev-thing. ✨ Default: YES
  • userlist_deny β€” okay so this one only gets looked at if userlist_enable is turned on. Set it to NO and suddenly it's giving allowlist energy: users get denied login unless they're explicitly listed in the file named by userlist_file. And the denial? It lands before they're ever asked for a password. Sneaky but cute. πŸ’… Default: YES
  • userlist_enable β€” turn this on and vsftpd loads a whole list of usernames from the filename given by userlist_file. If someone tries to log in with a name that's on that list, they get denied before the password prompt even shows up. Why do we care? Because it stops cleartext passwords from ever hitting the wire. Very protective, very demure. 🫢 See also userlist_deny. Default: NO
  • validate_cert β€” set it to yes and every single SSL client certificate that comes in must validate OK. And no, self-signed certs do not count as OK validation, bestie, don't even try it. πŸ™ˆ (New in v2.0.6). Default: NO
  • virtual_use_local_privs β€” turn this on and virtual users get the exact same privileges as local users. Leave it off (the default) and virtual users get anonymous-user privileges instead, which is lowkey way more restrictive β€” especially when it comes to write access. Default: NO
  • write_enable β€” this is the big one. It controls whether any FTP commands that change the filesystem are allowed or not. The commands in question: STOR, DELE, RNFR, RNTO, MKD, RMD, APPE and SITE. No write_enable, no writing. Periodt. πŸ‘‘ Default: NO
  • xferlog_enable β€” flip this on and a log file gets maintained detailing uploads and downloads. By default that file lives at /var/log/vsftpd.log, but you can move it wherever with the vsftpd_log_file config setting. Receipts! 🧾 Default: NO (but the sample config file enables it)
  • xferlog_std_format β€” enable this and your transfer log gets written in standard xferlog format, exactly like wu-ftpd does it. Why is that a slay? Because you can reuse all your existing transfer statistics generators. That said, the default format is genuinely more readable. The default location for this style of log file is /var/log/xferlog, but you can change it with xferlog_file. 🌸 Default: NO

πŸ”’ NUMERIC OPTIONS πŸ”’

Bestie, this is the number section. A numeric option must be set to a non-negative integer. Octal numbers are supported too β€” purely for the convenience of the umask options. To write an octal number, just use 0 as the first digit. That's it, that's the whole rule. πŸŽ€

  • accept_timeout β€” the timeout, in seconds, for a remote client to establish a connection with a PASV style data connection. Clock's ticking, babes. ⏰ Default: 60
  • anon_max_rate β€” the maximum data transfer rate permitted, in bytes per second, for anonymous clients. Default: 0 (unlimited)
  • anon_umask β€” the value that the umask for file creation gets set to for anonymous users. NOTE! If you want to specify octal values, remember the "0" prefix, otherwise the value gets treated as a base 10 integer and that is not the vibe you want. 😭 Default: 077
  • chown_upload_mode β€” the file mode to force for chown()ed anonymous uploads. (Added in v2.0.6). Default: 0600
  • connect_timeout β€” the timeout, in seconds, for a remote client to respond to our PORT style data connection. Default: 60
  • data_connection_timeout β€” the timeout, in seconds, which is roughly the max time we'll let data transfers stall with no progress. If this timeout triggers, the remote client gets kicked off. Bye! πŸ‘‹ Default: 300
  • delay_failed_login β€” the number of seconds to pause before reporting a failed login. A little dramatic pause, if you will. 🎭 Default: 1
  • delay_successful_login β€” the number of seconds to pause before allowing a successful login. Default: 0
  • file_open_mode β€” the permissions that uploaded files get created with. Umasks get applied on top of this value. You might wanna switch it to 0777 if you want your uploaded files to be executable. πŸ’… Default: 0666
  • ftp_data_port β€” the port from which PORT style connections originate (as long as the poorly named connect_from_port_20 is enabled). Yes, "poorly named" is the manpage's own words, not mine. πŸ’€ Default: 20
  • idle_session_timeout β€” the timeout, in seconds, which is the maximum time a remote client may spend between FTP commands. Trigger it and the remote client gets kicked off. No dead air allowed. πŸ¦‹ Default: 300
  • listen_port β€” if vsftpd is in standalone mode, this is the port it listens on for incoming FTP connections. Default: 21
  • local_max_rate β€” the maximum data transfer rate permitted, in bytes per second, for local authenticated users. Default: 0 (unlimited)
  • local_umask β€” the value that the umask for file creation gets set to for local users. NOTE! Same deal as before β€” want octal? Remember the "0" prefix or it gets read as a base 10 integer and everything goes sideways. πŸ™ˆ Default: 077
  • max_clients β€” if vsftpd is in standalone mode, this is the max number of clients that may be connected at once. Any extra clients trying to connect get an error message. Sorry babe, we're full. 🚫 Default: 0 (unlimited)
  • max_login_fails β€” after this many login failures, the session is killed. Straight up. πŸ’€ Default: 3
  • max_per_ip β€” if vsftpd is in standalone mode, this is the max number of clients that may connect from the same source internet address. Go over the limit and you get an error message. Default: 0 (unlimited)
  • pasv_max_port β€” the maximum port to allocate for PASV style data connections. Use this to carve out a narrow port range that makes firewalling way easier. πŸ”₯ Default: 0 (use any port)
  • pasv_min_port β€” the minimum port to allocate for PASV style data connections. Same deal β€” narrow port range, happy firewall. Default: 0 (use any port)
  • trans_chunk_size β€” you probably don't wanna change this, but if you must, try setting it to something like 8192 for a much smoother bandwidth limiter. Live your truth. ✨ Default: 0 (let vsftpd pick a sensible setting)

🧡 STRING OPTIONS 🧡

And now, the string options. Text-based, iconic, no numbers in sight. 🌈

  • anon_root β€” this option is a directory that vsftpd will try to change into after an anonymous login. If it fails? The failure is silently ignored. No drama, no error, just vibes. πŸ’œ Default: (none)
  • banned_email_file β€” the name of a file containing a list of anonymous e-mail passwords that are not permitted. This file only gets consulted if the deny_email_enable option is enabled. Default: /etc/vsftpd.banned_emails
  • banner_file β€” the name of a file containing text to display when someone connects to the server. Set this and it overrides the banner string provided by the ftpd_banner option. Take that, ftpd_banner. πŸ‘‘ Default: (none)
  • ca_certs_file β€” the name of a file to load Certificate Authority certs from, for the purpose of validating client certs. The loaded certs also get advertised to the client, to cater for TLSv1.0 clients like the z/OS FTP client. (We love a legacy-friendly moment. 🫢) Regrettably, the default SSL CA cert paths are not used, because of vsftpd's use of restricted filesystem spaces (chroot). (Added in v2.0.6). Default: (none)
  • chown_username β€” the name of the user who gets ownership of anonymously uploaded files. This option is only relevant if another option, chown_uploads, is set. Default: root
  • chroot_list_file β€” the name of a file containing a list of local users who will be placed in a chroot() jail in their home directory. Only relevant if the chroot_list_enable option is enabled. But here's the twist πŸŒ€ β€” if the chroot_local_user option is enabled, then the list file flips into a list of users to NOT place in a chroot() jail. Plot twist! Default: /etc/vsftpd.chroot_list
  • cmds_allowed β€” this option specifies a comma separated list of allowed FTP commands (post login β€” USER, PASS and QUIT and others are always allowed pre-login). Every other command gets rejected. This is a powerful way to really lock down an FTP server. Example: cmds_allowed=PASV,RETR,QUIT Default: (none)
  • cmds_denied β€” this option specifies a comma separated list of denied FTP commands (post login β€” USER, PASS, QUIT and others are always allowed pre-login). If a command shows up on both this and cmds_allowed, then the denial takes precedence. Denial wins, always. πŸ’… (Added in v2.1.0). Default: (none)
  • deny_file β€” this option sets a pattern for filenames (and directory names etc.) that should not be accessible in any way. Important: the affected items are not hidden β€” they're visible, but any attempt to do anything to them (download, change into directory, affect something within the directory, etc.) will be denied. This option is very simple, and should not be used for serious access control β€” the filesystem's permissions should be used in preference. However, it may be useful in certain virtual user setups. In particular, be aware that if a filename is accessible by a variety of names (maybe due to symbolic links or hard links), then care must be taken to deny access to all the names. Access will be denied to items if their name contains the string given by hide_file, or if they match the regular expression specified by hide_file. Note that vsftpd's regular expression matching code is a simple implementation which is a subset of full regular expression functionality. Because of this, you will need to carefully and exhaustively test any application of this option. And you are recommended to use filesystem permissions for any important security policies due to their greater reliability. Supported regex syntax is any number of *, ? and unnested {,} operators. Regex matching is only supported on the last component of a path, e.g. a/b/? is supported but a/?/c is not. Example: deny_file={*.mp3,*.mov,.private} Default: (none)
Okay bestie real talk β€” that deny_file paragraph is long, but every word of it matters. Test exhaustively. Use filesystem permissions for the serious security stuff. That's not me being dramatic, that's the manpage. πŸŽ€
  • download_file β€” okay so this one lets you gatekeep downloads πŸ’… only files whose names match the pattern you give get to be downloaded. If a filename also matches the deny_file pattern, the denial wins β€” denial takes precedence, no cap. For how to actually use it and what the patterns look like, go read the deny_file option. Default: (none)
  • dsa_cert_file β€” tells vsftpd where your DSA certificate lives, for the SSL-encrypted connections. ✨ Default: (none - an RSA certificate suffices)
  • dsa_private_key_file β€” same vibe but for the DSA private key used on SSL-encrypted connections. If you don't set this one, vsftpd assumes the private key is chillin' in the same file as the certificate. 🫢 Default: (none)
  • email_password_file β€” you can point this at an alternate file for the secure_email_list_enable setting to use. πŸ“§ Default: /etc/vsftpd.email_passwords
  • ftp_username β€” the name of the user vsftpd uses to handle anonymous FTP. Their home directory is the root of the anonymous FTP area, iconic. 🏠 Default: ftp
  • ftpd_banner β€” a string option that lets you override the greeting banner vsftpd shows when a connection first rolls in. Make it cute, make it yours. πŸŽ€ Default: (none - default vsftpd banner is displayed)
  • guest_username β€” go read the boolean setting guest_enable to find out what even counts as a guest login. This setting is the real username that guest users get mapped onto. πŸ¦‹ Default: ftp
  • hide_file β€” set a pattern for filenames (and directory names, and honestly whatever else) that should be hidden from directory listings. And bestie, listen β€” despite being hidden, those files and directories are still fully accessible to any client who knows the actual names to use. πŸ™ˆ Items get hidden if their names contain the string given by hide_file, or if they match the regular expression specified by hide_file. Lowkey important: vsftpd's regex matching code is a simple implementation, just a subset of full regex functionality. See deny_file for exactly which regex syntax is supported. Example:
hide_file={*.mp3,.hidden,hide*,h?}

Default: (none)

  • listen_address β€” if vsftpd is in standalone mode, this overrides the default listen address (which is all local interfaces). Give it a numeric IP address. πŸ”’ Default: (none)
  • listen_address6 β€” like listen_address, but it sets the default listen address for the IPv6 listener (the one used if listen_ipv6 is set). Format is standard IPv6 address format. 🌐 Default: (none)
  • local_root β€” a directory vsftpd will try to change into after a local (i.e. non-anonymous) login. If it fails? Silently ignored. No drama, no error, just vibes. Default: (none)
  • message_file β€” the name of the file vsftpd looks for whenever a new directory is entered. Its contents get shown to the remote user. This only matters if dirmessage_enable is turned on. πŸ’Œ Default: .message
  • nopriv_user β€” the user vsftpd switches to when it wants to be totally unprivileged. Note that this should be a dedicated user, not nobody. The nobody user tends to be used for rather a lot of important things on most machines, so like, don't overload them. πŸ’€ Default: nobody
  • pam_service_name β€” the name of the PAM service vsftpd will use. πŸ” Default: vsftpd
  • pasv_address β€” use this to override the IP address vsftpd advertises in response to the PASV command. Give it a numeric IP address β€” unless pasv_addr_resolve is enabled, in which case you can hand over a hostname and it'll get DNS resolved for you at startup. ✨ Default: (none - the address is taken from the incoming connected socket)
  • rsa_cert_file β€” where your RSA certificate lives, for SSL-encrypted connections. πŸ‘‘ Default: /usr/share/ssl/certs/vsftpd.pem
  • rsa_private_key_file β€” where your RSA private key lives, for SSL-encrypted connections. Don't set it and vsftpd expects the private key to be in the same file as the certificate. 🫢 Default: (none)
  • secure_chroot_dir β€” this should be the name of a directory that is empty. Also, the directory should not be writable by the ftp user. It's used as a secure chroot() jail at the times vsftpd doesn't need filesystem access. πŸ”’ Default: /var/run/vsftpd/empty
  • ssl_ciphers β€” pick which SSL ciphers vsftpd will allow for encrypted SSL connections. See the ciphers man page for further details. Ngl, restricting ciphers is a genuinely useful security precaution, because it stops malicious remote parties from forcing a cipher they've found problems with. πŸ’… Default: DES-CBC3-SHA
  • ssl_sni_hostname β€” if you set this, SSL connections get rejected unless the SNI hostname in the incoming handshakes matches this value. No match, no entry. 🚫 Default: (none)
  • upload_file β€” the uploads-side twin of download_file: restrict uploads to files with names matching the specified pattern. And again, if a filename also matches the deny_file pattern, the denial takes precedence. For usage and pattern details, see the deny_file option. Default: (none)
  • user_config_dir β€” okay this one is powerful, main character energy fr fr. πŸ‘‘ It lets you override any config option in this manual page, on a per-user basis. Usage is simple and best shown with an example. If you set user_config_dir to /etc/vsftpd_user_conf and then log on as the user "chris", vsftpd will apply the settings in the file /etc/vsftpd_user_conf/chris for the duration of the session. The format of that file is exactly as detailed in this manual page! PLEASE NOTE that not all settings are effective on a per-user basis β€” for example, many settings only apply prior to the user's session being started. Examples of settings which will not affect any behaviour on a per-user basis include listen_address, banner_file, max_per_ip, max_clients, xferlog_file, etc. Default: (none)
  • user_sub_token β€” useful in conjunction with virtual users. It auto-generates a home directory for each virtual user based on a template. For example, if the home directory of the real user specified via guest_username is /home/virtual/$USER, and user_sub_token is set to $USER, then when virtual user fred logs in, he'll end up (usually chroot()'ed) in the directory /home/virtual/fred. This option also takes effect if local_root contains user_sub_token. 🧚 Default: (none)
  • userlist_file β€” the name of the file that gets loaded when the userlist_enable option is active. πŸ“‹ Default: /etc/vsftpd.user_list
  • vsftpd_log_file β€” the name of the file where the vsftpd-style log file gets written. Heads up, this log is only written if xferlog_enable is set and xferlog_std_format is NOT set. Alternatively, it gets written if you've set dual_log_enable. One further complication β€” if you've set syslog_enable, then this file is not written and output goes to the system log instead. 🌈 Default: /var/log/vsftpd.log
  • xferlog_file β€” the name of the file where the wu-ftpd style transfer log gets written. That transfer log is only written if xferlog_enable is set, along with xferlog_std_format. Alternatively, it gets written if you've set dual_log_enable. πŸ”₯ Default: /var/log/xferlog

πŸ’– AUTHOR πŸ’–

scarybeasts@gmail.com


okay that's a wrap bestie, you made it to the end of the vsftpd.conf(5) era 🫢 that little footer down there is the source/version-and-date tag, and yes it's literally just VSFTPD.CONF(5) β€” no version number, no date, just the section, and honestly? periodt. βœ¨πŸ’…πŸŒΈ

πŸ“¦ where this page comes from