1. 安装带MySQL支持的proftpd:
USE="mysql" emerge proftpd
2. 建立数据库:
create database ftp;
grant all privileges on ftp.* to [email protected] identified by "ftp000";
create table `users` ( usrname varchar(255) not null, passwd varchar(255) not null, uid int unsigned default null, gid int unsigned default null, home varchar(255) not null, shell varchar(255) not null, primary key(`usrname`) )type=myisam;
create table `groups` ( grpname varchar(255) not null default '', gid int unsigned not null default '0', members text not null, primary key(`grpname`) )type=myisam;
insert into users values('druggo',password('1234'),10001,10000,'/home/druggo/','');
insert into groups values('gentoo','10000','druggo');

3. 加入验证信息到配置文件/etc/proftpd/proftpd.conf
SQLAuthTypes Backend Crypt
SQLAuthenticate users* groups*
SQLConnectInfo [email protected] ftp ftp000
SQLUserInfo users usrname passwd uid gid home shell
SQLGroupInfo groups grpname gid members

4. 启动MySQL和Proftpd,测试登录,OK。
5. 需要限制用户在自己的home里,加一句
DefaultRoot ~
6. 支持上传续传,(下载续传默认支持)
AllowStoreRestart on