FTP配置模板

《按ctrl+A全选复制粘贴》

# Example config file /etc/vsftpd/vsftpd.conf

#

# Allow anonymous FTP? (Beware - allowed by default if you comment this out).

anonymous_enable=YES

#

# Uncomment this to allow local users to log in.

local_enable=YES

#

# Uncomment this to enable any form of FTP write command.

write_enable=YES

#

# 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

#anon_umask=022

#

# Activate directory messages - messages given to remote users when they

# go into a certain directory.

dirmessage_enable=YES

#

# Activate logging of uploads/downloads.

xferlog_enable=YES

#

# Make sure PORT transfer connections originate from port 20 (ftp-data).

connect_from_port_20=YES

#

#chown_uploads=YES

listen=YES

#

# Make sure, that one of the listen options is commented !!

#listen_ipv6=YES

pam_service_name=vsftpd

#/etc/vsftpd/user_list文件是否生效

userlist_enable=YES

#配置本地用户的根目录

local_root=/var/ftp/anon

#是否把所有用户限制在根目录下

chroot_local_user=YES

#启用例外用户,以及设置例外用户名单文件位置

#例外用户不会被锁定在主目录

chroot_list_enable=YES

chroot_list_file=/etc/vsftpd/chroot_list

#开启被动模式

pasv_enable=YES

allow_writeable_chroot=YES

#设置地址以及端口

pasv_address=121.40.168.187

pasv_min_port=50000

pasv_max_port=50010