# vsftpd 配置文件

# 基本设置
listen=YES
listen_ipv6=NO
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES

# 安全设置
chroot_local_user=YES
allow_writeable_chroot=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO

# 用户设置
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO

# 目录设置
local_root=${FTP_BASE_PATH}/share

# 被动模式设置
pasv_enable=YES
pasv_min_port=21100
pasv_max_port=21110
pasv_address=0.0.0.0

# 日志设置
xferlog_file=/var/log/vsftpd/vsftpd.log
log_ftp_protocol=YES

# 其他设置
hide_ids=YES
tcp_wrappers=YES

# 文件上传设置
file_open_mode=0666
local_umask=022

# 超时设置
idle_session_timeout=300
data_connection_timeout=300

# 限制设置
max_clients=50
max_per_ip=5
