# Example config file /etc/vsftpd/vsftpd.conf # # The default compiled in settings are fairly paranoid. This sample file # loosens things up a bit, to make the ftp daemon more usable. # Please see vsftpd.conf.5 for all compiled in defaults. # # READ THIS: This example file is NOT an exhaustive list of vsftpd options. # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's # capabilities. # # Allow anonymous FTP? (Beware - allowed by default if you comment this out). anonymous_enable=YES <==设置是否允许匿名用户登录FTP服务器,默认为YES # # Uncomment this to allow local users to log in. # When SELinux is enforcing check for SE bool ftp_home_dir local_enable=YES <==是否允许本地用户登录FTP服务器,默认为NO # # Uncomment this to enable any form of FTP write command. write_enable=YES <==是否对登录用户开启写权限,属全局性设置,默认NO # # Default umask for local users is 077. You may wish to change this to 022, # if your users expect that (022 is used by most other ftpd's) local_umask=022 <==设置本地用户的文件生成umask为022,默认是077 # # Uncomment this to allow the anonymous FTP user to upload files. This only # has an effect if the above global write enable is activated. Also, you will # obviously need to create a directory writable by the FTP user. # When SELinux is enforcing check for SE bool allow_ftpd_anon_write, allow_ftpd_full_access #anon_upload_enable=YES <==是否允许匿名用户上传文件,默认为NO # # Uncomment this if you want the anonymous FTP user to be able to create # new directories. #anon_mkdir_write_enable=YES <==是否允许匿名用户创建目录,默认为NO # # Activate directory messages - messages given to remote users when they # go into a certain directory. dirmessage_enable=YES <==设置是否显示目录消息,若设置为YES,进入目录时候将显示该目录中message_file配置文件(.message)中的内容。 # # Activate logging of uploads/downloads. xferlog_enable=YES <==是否启用FTP上传或下载日志记录,默认为NO # # Make sure PORT transfer connections originate from port 20 (ftp-data). connect_from_port_20=YES <==是够允许主动模式FTP,默认为NO # # If you want, you can arrange for uploaded anonymous files to be owned by # a different user. Note! Using "root" for uploaded files is not # recommended! #chown_uploads=YES <==用于设置是否改变匿名用户上传的文档的属主,默认为NO #chown_username=whoever <==设置匿名用户上传的文档的属主名,只有chown_uploads=YES时才有效,默认为root(建议不要为root用户) # # You may override where the log file goes if you like. The default is shown # below. #xferlog_file=/var/log/xferlog <==设置日志文件名及路径,需启用xferlog_enable选项 # # If you want, you can have your log file in standard ftpd xferlog format. # Note that the default log file location is /var/log/xferlog in this case. xferlog_std_format=YES <==日志文件是否使用标准的xferlog日志文件格式(与wu-ftpd使用的格式相同) ,默认为NO # # You may change the default value for timing out an idle session. #idle_session_timeout=600 <==设置多长时间不对FTP服务器进行任何操作,则断开该FTP连接,单位为秒,默认为300 # # You may change the default value for timing out a data connection. #data_connection_timeout=120 <==设置建立FTP数据连接的超时时间,默认为300秒 # # It is recommended that you define on your system a unique user which the # ftp server can use as a totally isolated and unprivileged user. #nopriv_user=ftpsecure <==运行vsftpd需要的非特权系统用户,默认是nobody # # Enable this and the server will recognise asynchronous ABOR requests. Not # recommended for security (the code is non-trivial). Not enabling it, # however, may confuse older FTP clients. #async_abor_enable=YES <==是否识别异步ABOR请求 # # By default the server will pretend to allow ASCII mode but in fact ignore # the request. Turn on the below options to have the server actually do ASCII # mangling on files when in ASCII mode. # Beware that on some FTP servers, ASCII support allows a denial of service # attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd # predicted this attack and has always been safe, reporting the size of the # raw file. # ASCII mangling is a horrible feature of the protocol. #ascii_upload_enable=YES <==设置是否启用ASCII模式下载数据,默认为NO #ascii_download_enable=YES <==设置是否启用ASCII模式上传数据,默认为NO # # You may fully customise the login banner string: #ftpd_banner=Welcome to blah FTP service. <==该配置项用于设置比较简短的欢迎信息,若欢迎信息较多,则可使用banner_file配置项 # # You may specify a file of disallowed anonymous e-mail addresses. Apparently # useful for combatting certain DoS attacks. #deny_email_enable=YES <==黑名单设置,如果很讨厌某些email address,就可以使用此设定来取消他的登录权限 # (default follows) #banned_email_file=/etc/vsftpd/banned_emails <==当deny_email_enable=YES时,可以利用这个设定项来规定哪些邮件地址不可登录vsftpd服务器 # # You may specify an explicit list of local users to chroot() to their home # directory. If chroot_local_user is YES, then this list becomes a list of # users to NOT chroot(). # (Warning! chroot'ing can be very dangerous. If using chroot, make sure that # the user does not have write access to the top level directory within the # chroot) #chroot_local_user=YES <==是否将实体用户限制在自己的家目录内,默认为NO #chroot_list_enable=YES <==设置是否启用chroot_list_file配置项指定的用户列表文件,默认为NO # (default follows) #chroot_list_file=/etc/vsftpd/chroot_list <==用于指定用户列表文件,该文件用于控制哪些用户限制在家目录 # # You may activate the "-R" option to the builtin ls. This is disabled by # default to avoid remote users being able to cause excessive I/O on large # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume # the presence of the "-R" option, so there is a strong case for enabling it. #ls_recurse_enable=YES <==是否允许递归查询,默认为NO,以防止远程用户造成过量的I/O # # When "listen" directive is enabled, vsftpd runs in standalone mode and # listens on IPv4 sockets. This directive cannot be used in conjunction # with the listen_ipv6 directive. listen=NO <==设置vsftpd服务器是否以standalone模式运行,默认为NO # # This directive enables listening on IPv6 sockets. By default, listening # on the IPv6 "any" address (::) will accept connections from both IPv6 # and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6 # sockets. If you want that (perhaps because you want to listen on specific # addresses) then you must run two copies of vsftpd with two configuration # files. # Make sure, that one of the listen options is commented !! listen_ipv6=YES <==是否监听ipv6地址,默认为NO