1*4882a593Smuzhiyun# Example config file /etc/vsftpd.conf 2*4882a593Smuzhiyun# 3*4882a593Smuzhiyun# The default compiled in settings are fairly paranoid. This sample file 4*4882a593Smuzhiyun# loosens things up a bit, to make the ftp daemon more usable. 5*4882a593Smuzhiyun# Please see vsftpd.conf.5 for all compiled in defaults. 6*4882a593Smuzhiyun# 7*4882a593Smuzhiyun# READ THIS: This example file is NOT an exhaustive list of vsftpd options. 8*4882a593Smuzhiyun# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's 9*4882a593Smuzhiyun# capabilities. 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun# run standalone 12*4882a593Smuzhiyunlisten=YES 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun# Allow anonymous FTP? (Beware - allowed by default if you comment this out). 15*4882a593Smuzhiyunanonymous_enable=NO 16*4882a593Smuzhiyun# 17*4882a593Smuzhiyun# Uncomment this to allow local users to log in. 18*4882a593Smuzhiyunlocal_enable=YES 19*4882a593Smuzhiyun# 20*4882a593Smuzhiyun# Uncomment this to enable any form of FTP write command. 21*4882a593Smuzhiyunwrite_enable=YES 22*4882a593Smuzhiyun# 23*4882a593Smuzhiyun# Default umask for local users is 077. You may wish to change this to 022, 24*4882a593Smuzhiyun# if your users expect that (022 is used by most other ftpd's) 25*4882a593Smuzhiyunlocal_umask=022 26*4882a593Smuzhiyun# 27*4882a593Smuzhiyun# Uncomment this to allow the anonymous FTP user to upload files. This only 28*4882a593Smuzhiyun# has an effect if the above global write enable is activated. Also, you will 29*4882a593Smuzhiyun# obviously need to create a directory writable by the FTP user. 30*4882a593Smuzhiyun#anon_upload_enable=YES 31*4882a593Smuzhiyun# 32*4882a593Smuzhiyun# Uncomment this if you want the anonymous FTP user to be able to create 33*4882a593Smuzhiyun# new directories. 34*4882a593Smuzhiyun#anon_mkdir_write_enable=YES 35*4882a593Smuzhiyun# 36*4882a593Smuzhiyun# Activate directory messages - messages given to remote users when they 37*4882a593Smuzhiyun# go into a certain directory. 38*4882a593Smuzhiyundirmessage_enable=YES 39*4882a593Smuzhiyun# 40*4882a593Smuzhiyun# Activate logging of uploads/downloads. 41*4882a593Smuzhiyunxferlog_enable=YES 42*4882a593Smuzhiyun# 43*4882a593Smuzhiyun# Make sure PORT transfer connections originate from port 20 (ftp-data). 44*4882a593Smuzhiyunconnect_from_port_20=YES 45*4882a593Smuzhiyun# 46*4882a593Smuzhiyun# If you want, you can arrange for uploaded anonymous files to be owned by 47*4882a593Smuzhiyun# a different user. Note! Using "root" for uploaded files is not 48*4882a593Smuzhiyun# recommended! 49*4882a593Smuzhiyun#chown_uploads=YES 50*4882a593Smuzhiyun#chown_username=whoever 51*4882a593Smuzhiyun# 52*4882a593Smuzhiyun# You may override where the log file goes if you like. The default is shown 53*4882a593Smuzhiyun# below. 54*4882a593Smuzhiyun#xferlog_file=/var/log/vsftpd.log 55*4882a593Smuzhiyun# 56*4882a593Smuzhiyun# If you want, you can have your log file in standard ftpd xferlog format 57*4882a593Smuzhiyunxferlog_std_format=YES 58*4882a593Smuzhiyun# 59*4882a593Smuzhiyun# You may change the default value for timing out an idle session. 60*4882a593Smuzhiyun#idle_session_timeout=600 61*4882a593Smuzhiyun# 62*4882a593Smuzhiyun# You may change the default value for timing out a data connection. 63*4882a593Smuzhiyun#data_connection_timeout=120 64*4882a593Smuzhiyun# 65*4882a593Smuzhiyun# It is recommended that you define on your system a unique user which the 66*4882a593Smuzhiyun# ftp server can use as a totally isolated and unprivileged user. 67*4882a593Smuzhiyun#nopriv_user=ftp 68*4882a593Smuzhiyun# 69*4882a593Smuzhiyun# Enable this and the server will recognise asynchronous ABOR requests. Not 70*4882a593Smuzhiyun# recommended for security (the code is non-trivial). Not enabling it, 71*4882a593Smuzhiyun# however, may confuse older FTP clients. 72*4882a593Smuzhiyun#async_abor_enable=YES 73*4882a593Smuzhiyun# 74*4882a593Smuzhiyun# By default the server will pretend to allow ASCII mode but in fact ignore 75*4882a593Smuzhiyun# the request. Turn on the below options to have the server actually do ASCII 76*4882a593Smuzhiyun# mangling on files when in ASCII mode. 77*4882a593Smuzhiyun# Beware that turning on ascii_download_enable enables malicious remote parties 78*4882a593Smuzhiyun# to consume your I/O resources, by issuing the command "SIZE /big/file" in 79*4882a593Smuzhiyun# ASCII mode. 80*4882a593Smuzhiyun# These ASCII options are split into upload and download because you may wish 81*4882a593Smuzhiyun# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking), 82*4882a593Smuzhiyun# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be 83*4882a593Smuzhiyun# on the client anyway.. 84*4882a593Smuzhiyun#ascii_upload_enable=YES 85*4882a593Smuzhiyun#ascii_download_enable=YES 86*4882a593Smuzhiyun# 87*4882a593Smuzhiyun# You may fully customise the login banner string: 88*4882a593Smuzhiyun#ftpd_banner=Welcome to blah FTP service. 89*4882a593Smuzhiyun# 90*4882a593Smuzhiyun# You may specify a file of disallowed anonymous e-mail addresses. Apparently 91*4882a593Smuzhiyun# useful for combatting certain DoS attacks. 92*4882a593Smuzhiyun#deny_email_enable=YES 93*4882a593Smuzhiyun# (default follows) 94*4882a593Smuzhiyun#banned_email_file=/etc/vsftpd.banned_emails 95*4882a593Smuzhiyun# 96*4882a593Smuzhiyun# You may specify an explicit list of local users to chroot() to their home 97*4882a593Smuzhiyun# directory. If chroot_local_user is YES, then this list becomes a list of 98*4882a593Smuzhiyun# users to NOT chroot(). 99*4882a593Smuzhiyun#chroot_list_enable=YES 100*4882a593Smuzhiyun# (default follows) 101*4882a593Smuzhiyun#chroot_list_file=/etc/vsftpd.chroot_list 102*4882a593Smuzhiyun# 103*4882a593Smuzhiyun# You may activate the "-R" option to the builtin ls. This is disabled by 104*4882a593Smuzhiyun# default to avoid remote users being able to cause excessive I/O on large 105*4882a593Smuzhiyun# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume 106*4882a593Smuzhiyun# the presence of the "-R" option, so there is a strong case for enabling it. 107*4882a593Smuzhiyun#ls_recurse_enable=YES 108*4882a593Smuzhiyun# 109*4882a593Smuzhiyun# This string is the name of the PAM service vsftpd will use. 110*4882a593Smuzhiyunpam_service_name=vsftpd 111*4882a593Smuzhiyun# 112*4882a593Smuzhiyun# This option is examined if userlist_enable is activated. If you set this 113*4882a593Smuzhiyun# setting to NO, then users will be denied login unless they are explicitly 114*4882a593Smuzhiyun# listed in the file specified by userlist_file. When login is denied, the 115*4882a593Smuzhiyun# denial is issued before the user is asked for a password. 116*4882a593Smuzhiyunuserlist_deny=YES 117*4882a593Smuzhiyun# 118*4882a593Smuzhiyun# If enabled, vsftpd will load a list of usernames, from the filename given by 119*4882a593Smuzhiyun# userlist_file. If a user tries to log in using a name in this file, they 120*4882a593Smuzhiyun# will be denied before they are asked for a password. This may be useful in 121*4882a593Smuzhiyun# preventing cleartext passwords being transmitted. See also userlist_deny. 122*4882a593Smuzhiyunuserlist_enable=YES 123*4882a593Smuzhiyun# 124*4882a593Smuzhiyun# If enabled, vsftpd will display directory listings with the time in your 125*4882a593Smuzhiyun# local time zone. The default is to display GMT. The times returned by the 126*4882a593Smuzhiyun# MDTM FTP command are also affected by this option. 127*4882a593Smuzhiyunuse_localtime=YES 128*4882a593Smuzhiyun# 129*4882a593Smuzhiyun# If set to YES, local users will be (by default) placed in a chroot() jail in 130*4882a593Smuzhiyun# their home directory after login. Warning: This option has security 131*4882a593Smuzhiyun# implications, especially if the users have upload permission, or shell access. 132*4882a593Smuzhiyun# Only enable if you know what you are doing. Note that these security implications 133*4882a593Smuzhiyun# are not vsftpd specific. They apply to all FTP daemons which offer to put 134*4882a593Smuzhiyun# local users in chroot() jails. 135*4882a593Smuzhiyunchroot_local_user=YES 136*4882a593Smuzhiyun# 137*4882a593Smuzhiyunallow_writeable_chroot=YES 138*4882a593Smuzhiyun# 139*4882a593Smuzhiyuntcp_wrappers=YES 140