1. Install pureftpd
Sudo apt-get install pure-ftpd
Sudo apt-get install pure-ftpd-mysql
2. Create a database and store an ftp user table
Create table 'users '(
'User' VARCHAR (16) not null default '',
'Password' VARCHAR (64) not null default '',
'Uid' VARCHAR (11) not null default '-1 ',
'Gid' VARCHAR (11) not null default '-1 ',
'Dir' VARCHAR (128) not null default '',
'Comment' tinytext not null,
Primary key ('user '),
Unique key 'user' ('user ')
) ENGINE = MyISAM default charset = utf8 COMMENT = 'ftp user'
3. Configuration
Edit/etc/pure-ftpd/db/mysql. conf
# MYSQLServer localhost
# MYSQLPort 3306
MYSQLUser pureftpd
MYSQLPassword ftpdpass
MYSQLDatabase pureftpd
# MYSQLCrypt md5, cleartext, crypt () or password ()-md5 is very recommendable uppon cleartext
MYSQLCrypt md5
4. Some configurations
// Restrict users to their home directories
Echo "yes">/etc/pure-ftpd/conf/ChrootEveryone
Echo "no">/etc/pure-ftpd/conf/AnonymousOnly