3 vsftpd.conf, the config file for vsftpd
5 vsftpd.conf may be used to control various aspects of vsftpd's behaviour. By
6 default, vsftpd looks for this file at the location
8 However, you may override this by specifying a command line argument to
9 vsftpd. The command line argument is the pathname of the configuration file
10 for vsftpd. This behaviour is useful because you may wish to use an advanced
13 to launch vsftpd with different configuration files on a per virtual host
17 The format of vsftpd.conf is very simple. Each line is either a comment or
18 a directive. Comment lines start with a # and are ignored. A directive line
23 It is important to note that it is an error to put any space between the
26 Each setting has a compiled in default which may be modified in the
30 Below is a list of boolean options. The value for a boolean option may be set
37 .B anon_mkdir_write_enable
38 If set to YES, anonymous users will be permitted to create new directories
39 under certain conditions. For this to work, the option
41 must be activated, and the anonymous ftp user must have write permission on
46 .B anon_other_write_enable
47 If set to YES, anonymous users will be permitted to perform write operations
48 other than upload and create directory, such as deletion and renaming. This
49 is generally not recommended but included for completeness.
54 If set to YES, anonymous users will be permitted to upload files under certain
55 conditions. For this to work, the option
57 must be activated, and the anonymous ftp user must have write permission on
58 desired upload locations.
62 .B anon_world_readable_only
63 When enabled, anonymous users will only be allowed to download files which
64 are world readable. This is recognising that the ftp user may own files,
65 especially in the presence of uploads.
70 Controls whether anonymous logins are permitted or not. If enabled,
75 are recognised as anonymous logins.
79 .B ascii_download_enable
80 When enabled, ASCII mode data transfers will be honoured on downloads.
84 .B ascii_upload_enable
85 When enabled, ASCII mode data transfers will be honoured on uploads.
90 When enabled, a special FTP command known as "async ABOR" will be enabled.
91 Only ill advised FTP clients will use this feature. Additionally, this feature
92 is awkward to handle, so it is disabled by default. Unfortunately, some FTP
93 clients will hang when cancelling a transfer unless this feature is available,
94 so you may wish to enable it.
99 When enabled, and vsftpd is started in "listen" mode, vsftpd will background
100 the listener process. i.e. control will immediately be returned to the shell
101 which launched vsftpd.
106 Note! This option only has an effect for non-PAM builds of vsftpd. If disabled,
107 vsftpd will not check /etc/shells for a valid user shell for local logins.
112 When enables, allows use of the SITE CHMOD command. NOTE! This only applies
113 to local users. Anonymous users never get to use SITE CHMOD.
118 If enabled, all anonymously uploaded files will have the ownership changed
119 to the user specified in the setting
121 This is useful from an administrative, and perhaps security, standpoint.
125 .B chroot_list_enable
126 If activated, you may provide a list of local users who are placed in a
127 chroot() jail in their home directory upon login. The meaning is slightly
128 different if chroot_local_user is set to YES. In this case, the list becomes
129 a list of users which are NOT to be placed in a chroot() jail.
130 By default, the file containing this list is
131 /etc/vsftpd.chroot_list, but you may override this with the
138 If set to YES, local users will be (by default) placed in a chroot() jail in
139 their home directory after login.
141 This option has security implications, especially if the users have upload
142 permission, or shell access. Only enable if you know what you are doing.
143 Note that these security implications are not vsftpd specific. They apply to
144 all FTP daemons which offer to put local users in chroot() jails.
148 .B connect_from_port_20
149 This controls whether PORT style data connections use port 20 (ftp-data) on
150 the server machine. For security reasons, some clients may insist that this
151 is the case. Conversely, disabling this option enables vsftpd to run with
152 slightly less privilege.
154 Default: NO (but the sample config file enables it)
157 If activated, you may provide a list of anonymous password e-mail responses
158 which cause login to be denied. By default, the file containing this list is
159 /etc/vsftpd.banned_emails, but you may override this with the
160 .BR banned_email_file
166 If set to NO, all directory list commands will give permission denied.
171 If enabled, users of the FTP server can be shown messages when they first
172 enter a new directory. By default, a directory is scanned for the
173 file .message, but that may be overridden with the configuration setting
176 Default: NO (but the sample config file enables it)
179 If set to NO, all download requests will give permission denied.
184 If enabled, two log files are generated in parallel, going by default to
187 .BR /var/log/vsftpd.log .
188 The former is a wu-ftpd style transfer log, parseable by standard tools. The
189 latter is vsftpd's own style log.
194 If activated, files and directories starting with . will be shown in directory
195 listings even if the "a" flag was not used by the client. This override
196 excludes the "." and ".." entries.
201 If enabled, all non-anonymous logins are classed as "guest" logins. A guest
202 login is remapped to the user specified in the
209 If enabled, all user and group information in directory listings will be
215 If enabled, vsftpd will run in standalone mode. This means that vsftpd must
216 not be run from an inetd of some kind. Instead, the vsftpd executable is
217 run once directly. vsftpd itself will then take care of listening for and
218 handling incoming connections.
223 Like the listen parameter, except vsftpd will listen on an IPv6 socket instead
224 of an IPv4 one. This parameter and the listen parameter are mutually
230 Controls whether local logins are permitted or not. If enabled, normal
231 user accounts in /etc/passwd may be used to log in.
236 When enabled, all FTP requests and responses are logged, providing the option
237 xferlog_std_format is not enabled. Useful for debugging.
242 When enabled, this setting will allow the use of "ls -R". This is a minor
243 security risk, because a ls -R at the top level of a large site may consume
249 When enabled, this prevents vsftpd from asking for an anonymous password -
250 the anonymous user will log straight in.
255 If you have a Linux 2.4 kernel, it is possible to use a different security
256 model which only uses one process per connection. It is a less pure security
257 model, but gains you performance. You really don't want to enable this unless
258 you know what you are doing, and your site supports huge numbers of
259 simultaneously connected users.
263 .B passwd_chroot_enable
264 If enabled, along with
265 .BR chroot_local_user
266 , then a chroot() jail location may be specified on a per-user basis. Each
267 user's jail is derived from their home directory string in /etc/passwd. The
268 occurrence of /./ in the home directory string denotes that the jail is at that
269 particular location in the path.
274 Set to NO if you want to disallow the PASV method of obtaining a data
280 Set to YES if you want to disable the PASV security check that ensures the
281 data connection originates from the same IP address as the control connection.
282 Only enable if you know what you are doing! The only legitimate use for this
283 is in some form of secure tunnelling scheme, or perhaps to facilitate FXP
289 Set to NO if you want to disallow the PORT method of obtaining a data
295 Set to YES if you want to disable the PORT security check that ensures that
296 outgoing data connections can only connect to the client. Only enable if
297 you know what you are doing!
301 .B secure_email_list_enable
302 Set to YES if you want only a specified list of e-mail passwords for anonymous
303 logins to be accepted. This is useful as a low-hassle way of restricting
304 access to low-security content without needing virtual users. When enabled,
305 anonymous logins are prevented unless the password provided is listed in the
306 file specified by the
307 .BR email_password_file
308 setting. The file format is one password per line, no extra whitespace. The
309 default filename is /etc/vsftpd.email_passwords.
314 This controls whether vsftpd attempts to maintain sessions for logins. If
315 vsftpd is maintaining sessions, it will try and update utmp and wtmp. It
316 will also open a pam_session if using PAM to authenticate, and only close
317 this upon logout. You may wish to disable this if you do not need session
318 logging, and you wish to give vsftpd more opportunity to run with less
319 processes and / or less privilege. NOTE - utmp and wtmp support is only
320 provided with PAM enabled builds.
324 .B setproctitle_enable
325 If enabled, vsftpd will try and show session status information in the system
326 process listing. In other words, the reported name of the process will change
327 to reflect what a vsftpd session is doing (idle, downloading etc). You
328 probably want to leave this off for security purposes.
333 If enabled, then any log output which would have gone to /var/log/vsftpd.log
334 goes to the system log instead. Logging is done under the FTPD facility.
339 If enabled, and vsftpd was compiled with tcp_wrappers support, incoming
340 connections will be fed through tcp_wrappers access control. Furthermore,
341 there is a mechanism for per-IP based configuration. If tcp_wrappers sets
342 the VSFTPD_LOAD_CONF environment variable, then the vsftpd session will try
343 and load the vsftpd configuration file specified in this variable.
348 By default, numeric IDs are shown in the user and group fields of directory
349 listings. You can get textual names by enabling this parameter. It is off
350 by default for performance reasons.
355 If enabled, vsftpd will display directory listings with the the time in your
356 local time zone. The default is to display GMT. The times returned by the
357 MDTM FTP command are also affected by this option.
362 An internal setting used for testing the relative benefit of using the
363 sendfile() system call on your platform.
368 This option is examined if
370 is activated. If you set this setting to NO, then users will be denied login
371 unless they are explicitly listed in the file specified by
373 When login is denied, the denial is issued before the user is asked for a
379 If enabled, vsftpd will load a list of usernames, from the filename given by
381 If a user tries to log in using a name in this file, they will be denied
382 before they are asked for a password. This may be useful in preventing
383 cleartext passwords being transmitted. See also
388 .B virtual_use_local_privs
389 If enabled, virtual users will use the same privileges as local users. By
390 default, virtual users will use the same privileges as anonymous users, which
391 tends to be more restrictive (especially in terms of write access).
396 This controls whether any FTP commands which change the filesystem are allowed
397 or not. These commands are: STOR, DELE, RNFR, RNTO, MKD, RMD, APPE and SITE.
402 If enabled, a log file will be maintained detailling uploads and downloads.
403 By default, this file will be placed at /var/log/vsftpd.log, but this location
404 may be overridden using the configuration setting
405 .BR vsftpd_log_file .
407 Default: NO (but the sample config file enables it)
409 .B xferlog_std_format
410 If enabled, the transfer log file will be written in standard xferlog format,
411 as used by wu-ftpd. This is useful because you can reuse existing transfer
412 statistics generators. The default format is more readable, however. The
413 default location for this style of log file is /var/log/xferlog, but you may
414 change it with the setting
420 Below is a list of numeric options. A numeric option must be set to a non
421 negative integer. Octal numbers are supported, for convenience of the umask
422 options. To specify an octal number, use 0 as the first digit of the number.
426 The timeout, in seconds, for a remote client to establish connection with
427 a PASV style data connection.
432 The maximum data transfer rate permitted, in bytes per second, for anonymous
435 Default: 0 (unlimited)
438 The value that the umask for file creation is set to for anonymous users. NOTE! If you want to specify octal values, remember the "0" prefix otherwise the
439 value will be treated as a base 10 integer!
444 The timeout, in seconds, for a remote client to respond to our PORT style
449 .B data_connection_timeout
450 The timeout, in seconds, which is roughly the maximum time we permit data
451 transfers to stall for with no progress. If the timeout triggers, the remote
452 client is kicked off.
457 The permissions with which uploaded files are created. Umasks are applied
458 on top of this value. You may wish to change to 0777 if you want uploaded
459 files to be executable.
464 The port from which PORT style connections originate (as long as the poorly
466 .BR connect_from_port_20
471 .B idle_session_timeout
472 The timeout, in seconds, which is the maximum time a remote client may spend
473 between FTP commands. If the timeout triggers, the remote client is kicked
479 If vsftpd is in standalone mode, this is the port it will listen on for
480 incoming FTP connections.
485 The maximum data transfer rate permitted, in bytes per second, for local
488 Default: 0 (unlimited)
491 The value that the umask for file creation is set to for local users. NOTE! If
492 you want to specify octal values, remember the "0" prefix otherwise the value
493 will be treated as a base 10 integer!
498 If vsftpd is in standalone mode, this is the maximum number of clients which
499 may be connected. Any additional clients connecting will get an error message.
501 Default: 0 (unlimited)
504 If vsftpd is in standalone mode, this is the maximum number of clients which
505 may be connected from the same source internet address. A client will get an
506 error message if they go over this limit.
508 Default: 0 (unlimited)
511 The maximum port to allocate for PASV style data connections. Can be used to
512 specify a narrow port range to assist firewalling.
514 Default: 0 (use any port)
517 The minimum port to allocate for PASV style data connections. Can be used to
518 specify a narrow port range to assist firewalling.
520 Default: 0 (use any port)
523 You probably don't want to change this, but try setting it to something like
524 8192 for a much smoother bandwidth limiter.
526 Default: 0 (let vsftpd pick a sensible setting)
529 Below is a list of string options.
533 This option represents a directory which vsftpd will try to change into
534 after an anonymous login. Failure is silently ignored.
539 This option is the name of a file containing a list of anonymous e-mail
540 passwords which are not permitted. This file is consulted if the option
541 .BR deny_email_enable
544 Default: /etc/vsftpd.banned_emails
547 This option is the name of a file containing text to display when someone
548 connects to the server. If set, it overrides the banner string provided by
556 This is the name of the user who is given ownership of anonymously uploaded
557 files. This option is only relevant if another option,
564 The option is the name of a file containing a list of local users which
565 will be placed in a chroot() jail in their home directory. This option is
566 only relevant if the option
567 .BR chroot_list_enable
568 is enabled. If the option
569 .BR chroot_local_user
570 is enabled, then the list file becomes a list of users to NOT place in a
573 Default: /etc/vsftpd.chroot_list
576 This options specifies a comma separated list of allowed FTP commands (post
577 login. USER, PASS and QUIT are always allowed pre-login). Other
578 commands are rejected. This is a powerful method of really locking down an
579 FTP server. Example: cmds_allowed=PASV,RETR,QUIT
584 This option can be used to set a pattern for filenames (and directory names
585 etc.) which should not be accessible in any way. The affected items are not
586 hidden, but any attempt to do anything to them (download, change into
587 directory, affect something within directory etc.) will be denied. This option
588 is very simple, and should not be used for serious access control - the
589 filesystem's permissions should be used in preference. However, this option
590 may be useful in certain virtual user setups. In particular aware that if
591 a filename is accessible by a variety of names (perhaps due to symbolic
592 links or hard links), then care must be taken to deny access to all the names.
593 Access will be denied to items if their name contains the string given by
594 hide_file, or if they match the regular expression specified by hide_file.
595 Note that vsftpd's regular expression matching code is a simple implementation
596 which is a subset of full regular expression functionality. Because of this,
597 you will need to carefully and exhaustively test any application of this
598 option. And you are recommended to use filesystem permissions for any
599 important security policies due to their greater reliability. Example:
600 deny_file={*.mp3,*.mov,.private}
604 .B email_password_file
605 This option can be used to provide an alternate file for usage by the
606 .BR secure_email_list_enable
609 Default: /etc/vsftpd.email_passwords
612 This is the name of the user we use for handling anonymous FTP. The home
613 directory of this user is the root of the anonymous FTP area.
618 This string option allows you to override the greeting banner displayed
619 by vsftpd when a connection first comes in.
621 Default: (none - default vsftpd banner is displayed)
624 See the boolean setting
626 for a description of what constitutes a guest login. This setting is the
627 real username which guest users are mapped to.
632 This option can be used to set a pattern for filenames (and directory names
633 etc.) which should be hidden from directory listings. Despite being hidden,
634 the files / directories etc. are fully accessible to clients who know what
635 names to actually use. Items will be hidden if their names contain the string
636 given by hide_file, or if they match the regular expression specified by
637 hide_file. Note that vsftpd's regular expression matching code is a simple
638 implementation which is a subset of full regular expression functionality.
639 Example: hide_file={*.mp3,.hidden,hide*,h?}
644 If vsftpd is in standalone mode, the default listen address (of all local
645 interfaces) may be overridden by this setting. Provide a numeric IP address.
650 Like listen_address, but specifies a default listen address for the IPv6
651 listener (which is used if listen_ipv6 is set). Format is standard IPv6
657 This option represents a directory which vsftpd will try to change into
658 after a local (i.e. non-anonymous) login. Failure is silently ignored.
663 This option is the name of the file we look for when a new directory is
664 entered. The contents are displayed to the remote user. This option is
665 only relevant if the option
666 .BR dirmessage_enable
672 This is the name of the user that is used by vsftpd when it want to be
673 totally unprivileged. Note that this should be a dedicated user, rather
674 than nobody. The user nobody tends to be used for rather a lot of important
675 things on most machines.
680 This string is the name of the PAM service vsftpd will use.
685 Use this option to override the IP address that vsftpd will advertise in
686 response to the PASV command. Provide a numeric IP address.
688 Default: (none - the address is taken from the incoming connected socket)
691 This option should be the name of a directory which is empty. Also, the
692 directory should not be writable by the ftp user. This directory is used
693 as a secure chroot() jail at times vsftpd does not require filesystem access.
695 Default: /usr/share/empty
698 This powerful option allows the override of any config option specified in
699 the manual page, on a per-user basis. Usage is simple, and is best illustrated
700 with an example. If you set
703 .BR /etc/vsftpd_user_conf
704 and then log on as the user "chris", then vsftpd will apply the settings in
706 .BR /etc/vsftpd_user_conf/chris
707 for the duration of the session. The format of this file is as detailed in
708 this manual page! PLEASE NOTE that not all settings are effective on a
709 per-user basis. For example, many settings only prior to the user's session
710 being started. Examples of settings which will not affect any behviour on
711 a per-user basis include listen_address, banner_file, max_per_ip, max_clients,
717 This option is useful is conjunction with virtual users. It is used to
718 automatically generate a home directory for each virtual user, based on a
719 template. For example, if the home directory of the real user specified via
722 .BR /home/virtual/$USER ,
727 then when virtual user fred logs in, he will end up (usually chroot()'ed) in
729 .BR /home/virtual/fred .
730 This option also takes affect if
738 This option is the name of the file loaded when the
742 Default: /etc/vsftpd.user_list
745 This option is the name of the file to which we write the vsftpd style
746 log file. This log is only written if the option
749 .BR xferlog_std_format
750 is NOT set. Alternatively, it is written if you have set the option
751 .BR dual_log_enable .
752 One further complication - if you have set
754 then this file is not written and output is sent to the system log instead.
756 Default: /var/log/vsftpd.log
759 This option is the name of the file to which we write the wu-ftpd style
760 transfer log. The transfer log is only written if the option
763 .BR xferlog_std_format .
764 Alternatively, it is written if you have set the option
765 .BR dual_log_enable .
767 Default: /var/log/xferlog
770 chris@scary.beasts.org