Professional Documents
Culture Documents
VSFTPD Configuration Options
VSFTPD Configuration Options
VSFTPD Configuration Options
<directive>=<value>
For each directive, replace <directive> with a valid directive and <value> with a valid value.
Important
There must not be any spaces between the <directive>, equal symbol, and
the <value> in a directive.
Comment lines must be preceded by a hash mark (#) and are ignored by the daemon.
For a complete list of all directives available, refer to the man page for vsftpd.conf.
Important
For an overview of ways to secure vsftpd, refer to the chapter titled Server
Security in the Red Hat Enterprise Linux Security Guide.
The following is a list of some of the more important directives within /etc/vsftpd
/vsftpd.conf. All directives not explicitly found within vsftpd's configuration file are set
to their default value.
listen — When enabled, vsftpd runs in stand-alone mode. Red Hat Enterprise
Linux sets this value to YES. This directive cannot be used in conjunction with the
listen_ipv6 directive.
listen_ipv6 — When enabled, vsftpd runs in stand-alone mode, but listens only
to IPv6 sockets. This directive cannot be used in conjunction with the listen
directive.
1 от 10
The default value is NO.
anonymous_enable — When enabled, anonymous users are allowed to log in. The
usernames anonymous and ftp are accepted.
Refer to Section 15.5.3 Anonymous User Options for a list of directives affecting
anonymous users.
banned_email_file — If the deny_email_enable directive is set to YES, this
directive specifies the file containing a list of anonymous email passwords which are
not permitted access to the server.
The default value is /etc/vsftpd.banned_emails.
ftpd_banner — When enabled, the string specified within this directive is displayed
when a connection is established to the server. This option can be overridden by the
banner_file directive.
local_enable — When enabled, local users are allowed to log into the system.
2 от 10
Refer to Section 15.5.4 Local User Options for a list of directives affecting local users.
pam_service_name — Specifies the PAM service name for vsftpd.
The default value is ftp. Note, in Red Hat Enterprise Linux, the value is set to
vsftpd.
tcp_wrappers — When enabled, TCP wrappers are used to grant access to the
server. If the FTP server is configured on multiple IP addresses, the
VSFTPD_LOAD_CONF option can be used to load different configuration files based on
the IP address being requested by the client. For more information about TCP
Wrappers, refer to Chapter 17 TCP Wrappers and xinetd.
The default value is NO. Note, in Red Hat Enterprise Linux, the value is set to YES.
userlist_enable — When enabled, the users listed in the file specified by the
userlist_file directive are denied access. Because access is denied before the
client is asked for a password, users are prevented from submitting unencrypted
passwords over the network.
The default value is NO, however under Red Hat Enterprise Linux the value is set to
YES.
cmds_allowed — Specifies a comma separated list of FTP commands that the server
allows. Any other commands are rejected.
There is no default value for this directive.
3 от 10
anon_upload_enable — When enabled in conjunction with the write_enable
directive, anonymous users are allowed to upload files within a parent directory which
has write permissions.
The default value is NO.
ftp_username — Specifies the local user account (listed in /etc/passwd) used for
the anonymous FTP user. The home directory specified in /etc/passwd for the user
is the root directory of the anonymous FTP user.
The default value is ftp.
chmod_enable — When enabled, the FTP command SITE CHMOD is allowed for
local users. This command allows the users to change the permissions on files.
The default value is YES.
chroot_list_enable — When enabled, the local users listed in the file specified in
the chroot_list_file directive are placed in a chroot jail upon log in.
4 от 10
directories after logging in.
The default value is NO.
Warning
guest_enable — When enabled, all non-anonymous users are logged in as the user
guest, which is the local user specified in the guest_username directive.
local_root — Specifies the directory vsftpd changes to after a local user logs in.
5 от 10
The default value is NO. Note, in Red Hat Enterprise Linux, the value is set to YES.
force_dot_files — When enabled, files beginning with a dot (.) are listed in
directory listings, with the exception of the . and .. files.
hide_ids — When enabled, all directory listings show ftp as the user and group for
each file.
The default value is NO.
message_file — Specifies the name of the message file when using the
dirmessage_enable directive.
text_userdb_names — When enabled, test usernames and group names are used
in place of UID and GID entries. Enabling this option may slow performance of the
server.
The default value is NO.
use_localtime — When enabled, directory listings reveal the local time for the
computer instead of GMT.
The default value is NO.
chown_uploads — When enabled, all files uploaded by anonymous users are owned
by the user specified in the chown_username directive.
write_enable — When enabled, FTP commands which can change the file system
are allowed, such as DELE, RNFR, and STOR.
6 от 10
xferlog_file directive (/var/log/xferlog by default) and a standard vsftpd
log file specified in the vsftpd_log_file directive (/var/log/vsftpd.log by
default).
The default value is NO.
vsftpd_log_file — Specifies the vsftpd log file. For this file to be used,
xferlog_enable must be enabled and xferlog_std_format must either be set to
NO or, if xferlog_std_format is set to YES, dual_log_enable must be enabled.
It is important to note that if syslog_enable is set to YES, the system log is used
instead of the file specified in this directive.
The default value is /var/log/vsftpd.log.
The default value is NO. Note, in Red Hat Enterprise Linux, the value is set to YES.
xferlog_file — Specifies the wu-ftpd-compatible log file. For this file to be used,
xferlog_enable must be enabled and xferlog_std_format must be set to YES.
It is also used if dual_log_enable is set to YES.
Important
7 от 10
To maintain compatibility with log files written by the older wu-ftpd FTP
server, the xferlog_std_format directive is set to YES under Red Hat
Enterprise Linux. However, this setting means that connections to the server
are not logged.
To both log connections in vsftpd format and maintain a wu-ftpd-
compatible file transfer log, set dual_log_enable to YES.
If maintaining a wu-ftpd-compatible file transfer log is not important, either
set xferlog_std_format to NO, comment the line with a hash mark (#), or
delete the line entirely.
accept_timeout — Specifies the amount of time for a client using passive mode to
establish a connection.
The default value is 60.
anon_max_rate — Specifies the maximum data transfer rate for anonymous users in
bytes per second.
The default value is 0, which does not limit the transfer rate.
ftp_data_port — Specifies the port used for active data connections when
connect_from_port_20 is set to YES.
8 от 10
listen_address — Specifies the IP address on which vsftpd listens for network
connections.
There is no default value for this directive.
Tip
Tip
listen_port — Specifies the port on which vsftpd listens for network connections.
local_max_rate — Specifies the maximum rate data is transfered for local users
logged into the server in bytes per second.
The default value is 0, which does not limit the transfer rate.
max_per_ip — Specifies the maximum of clients allowed to connected from the same
source IP address.
The default value is 0, which does not limit connections.
pasv_address — Specifies the IP address for the public facing IP address of the
server for servers behind Network Address Translation (NAT) firewalls. This enables
vsftpd to hand out the correct return address for passive mode connections.
9 от 10
pasv_max_port — Specifies the highest possible port sent to the FTP clients for
passive mode connections. This setting is used to limit the port range so that firewall
rules are easier to create.
The default value is 0, which does not limit the highest passive port range. The value
must not exceed 65535.
pasv_min_port — Specifies the lowest possible port sent to the FTP clients for
passive mode connections. This setting is used to limit the port range so that firewall
rules are easier to create.
The default value is 0, which does not limit the lowest passive port range. The value
must not be lower 1024.
Caution
10 от 10