install

apt-get install pure-ftpd

用户

groupadd ftpgroup
useradd -g ftpgroup -d /dev/null -s /etc ftpuser
mkdir /home/ftpusers
mkdir /home/ftpusers/ftp
pure-pw useradd ftp -u ftpuser -d /home/ftpusers/ftp
pure-pw mkdb ## 执行过pure-pw useradd等用户操作之后要进行更新数据库
ln -s /etc/pure-ftpd/pureftpd.passwd /etc/pureftpd.passwd
ln -s /etc/pure-ftpd/pureftpd.pdb /etc/pureftpd.pdb
ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/PureDB
chown -hR ftpuser:ftpgroup /home/ftpusers/

新增readonly账户

useradd -g ftpgroup -d /dev/null -s /etc ftpuser_readonly
pure-pw useradd ftp_guest -u ftpuser_readonly -d /home/ftpusers/ftp
pure-pw mkdb

参考

  1. https://help.ubuntu.com/community/PureFTP
  2. http://download.pureftpd.org/pub/pure-ftpd/doc/README.Virtual-Users
  3. http://marc.info/?l=pureftpd-list&m=128345058000347