- 操作系统
centos - 安装
yum install epel-release
yum install pure-ftpd
- 添加用户
# 创建系统用户
useradd ftp
# 更改所属主和所属组
chown -R ftp:ftp /home/ftp/
# 查看uid
id ftp
- 更改配置文件
PureDB 去掉注释
MinUID 要小于之前查看的uid值
- 创建用户
# 创建ftp用户,注意ftp用户是虚拟用户。
pure-pw useradd user -u ftp -d /home/ftp/
# 创建用户信息数据库文件
pure-pw mkdb
# 删除账号
# pure-pw userdel user
- 运行
pure-ftpd /etc/pure-ftpd/pure-ftpd.conf
附配置文件
ForcePassiveIP ftp主机ip
其他配置请自行搜索
############################################################
# #
# Configuration file for pure-ftpd #
# #
############################################################
# If you want to run Pure-FTPd with this configuration
# instead of command-line options, please run the
# following command :
#
# /usr/sbin/pure-ftpd /etc/pure-ftpd/pure-ftpd.conf
#
# Online documentation:
# https://www.pureftpd.org/project/pure-ftpd/doc
# Restrict users to their home directory
ChrootEveryone no
# If the previous option is set to "no", members of the following group
# won't be restricted. Others will be. If you don't want chroot()ing anyone,
# just comment out ChrootEveryone and TrustedGID.
# TrustedGID 100
# Turn on compatibility hacks for broken clients
BrokenClientsCompatibility no
# Maximum number of simultaneous users
MaxClientsNumber 50
# Run as a background process
Daemonize yes
# Maximum number of simultaneous clients with the same IP address