Pure-ftpd

Introduction
Pure-FTPd is a free (BSD), secure, production-quality and standard-conformant FTP server. It doesn't provide useless bells and whistles, but focuses on efficiency and ease of use. It provides simple answers to common needs, plus unique useful features for personal users as well as hosting providers.

To install please emerge it directly.

Use Flags
Before emerging please edit the use flag to suit your need.

Use flag available

Configuration
After emerge is done, please edit the configuration file in /etc/conf.d/pure-ftpd.

Don't forget to uncomment this line

Choose the listen ip and port

Authentication modes
Pure-FTPd supports different types of authentication:

default: unix passwords
every unix login can access the ftp server.

pam
Note that PAM uses the rules from /etc/pam.d/ftp for Pure-FTPd.

virtual
Virtual users is a simple mechanism to store a list of users, with their password, name, uid, directory, etc. It's just like /etc/passwd. But it's not /etc/passwd. It's a different file, only for FTP.

create a system user for virtual users

now you can create many virtual users, like this :

Joe's password is asked twice. With -d, joe will be chrooted. If you want to give joe access to the whole filesystem, use -D instead of -d.

You can delete joe account:

Change his password:

have a look at joe info:

and don't forget to commit changes. When you use -m argument, changes are commited automaticaly;

MYSQL support
edit /etc/pureftpd-mysql.conf

Create the table in mysql


 * 1) mysql -u root -p

mysql> create database pureftpd;

mysql> GRANT ALL PRIVILEGES ON pureftpd.* TO 'pureftpduser'@'localhost' IDENTIFIED BY 'pureftpdpassword';

mysql> CREATE TABLE pureftpd.users( User VARCHAR(16) BINARY NOT NULL,  Password VARCHAR(64) BINARY NOT NULL,  Uid INT(11) NOT NULL default '-1',  Gid INT(11) NOT NULL default '-1',  Dir VARCHAR(128) BINARY NOT NULL,  PRIMARY KEY  (User)  );

and you can add user like this

mysql> insert into pureftpd.users values('test','test',1000,1000,'/home/test');

SSL/TLS support
create a self-signed private certificate /etc/ssl/private/pure-ftpd.pem

"-Y 0", support for SSL/TLS is disabled. This is the default.

"-Y 1", clients can connect either the traditional way or through an SSL/TLS layer.

"-Y 2", cleartext sessions are refused and only SSL/TLS compatible clients are accepted

Running Pure-ftpd
Then you can run the pure-ftpd server from init.

and start it at boot

Pure-ftpd