Gentoo – FTP Server
If you have the need for a FTP server on your Gentoo system, Pure-ftp is a good choice. It is a lightweight, standards compliant, and production quality FTP server that is available in portage.
To install pure-ftp do the following:
The default use flags should be fine for most installations.
After it is done installing you need to edit the config file located in
Make sure to uncomment the following line:
So that it looks like this:
Now you need to figure out how you want users to authenticate to the FTP server.
To allow login to the FTP server with local user accounts use the following setting for AUTH:
For PAM authentication use the following:
And finally for built in virtual user support use the following:
The virtual user method stores the user information in the file /etc/pureftpd.pdb. In order to setup FTP virtual users do the following:
First setup the ftpgroup and the ftpuser system user
Now virtual users can be created by using the following syntax:
-d flag specifies the user’s home directory. This can be changed to any location you like as long as the user has sufficient privileges on the folder.
The following commands can be used to manage virtual users:
To delete a user:
To change a user’s password:
To view a user’s status:
To commit changes (NOTE: changes are commited automatically when using the [-m] flag):
Lastly we need to start the pure-ftpd service and add it to the default runlevel:
NOTE: If you are running iptables you will want to add the following rule to allow FTP traffic: