Pureftpd Server Configuration in Debian
The same source code compiles and runs on Linux,
OpenBSD, NetBSD, FreeBSD, Solaris, Tru64, Darwin, Irix and HPUX.
If you want to download pureftpd click here
Pureftpd server installation in Debian
If you want to install pureftpd in debian you need to run the following command
#apt-get install pure-ftpd-common pure-ftpd
Note:- these packages use a complete new configuration scheme, read the pure-ftpd-wrapper manual page for more information.
For pure-ftpd-wrapper man page click here
Starting and the Configuring the Server
PureFTPd has many options available, not only when installing the program, but also when starting the daemon. Here again we will only be covering a few of them but you can always get a full listing from the readme which accompanied the sourceball, or by typing the following at your terminal prompt as root:
Please note that these options are case-sensitive
-A -chroot everyone but root.
We will be issuing usernames and passwords for our FTP server, we will not be allowing anonymous logins, this is where the -l switch we used above comes in, PureFTPd has the ability to manage Virtual Users, which, put simply means the user doesn't actually exist as far as your system is concerned, only PureFTPd knows about these user types. We do this with another PureFTPd command called pure-pw, but first we need to create a system user and group to which all virtual users will be associated, literally thousands of virtual users can share the same system username as long as they are all chrooted and have their own home directory. So as root issue the following commands at your terminal prompt:
#useradd -g ftpgroup -d /dev/null -s /etc ftpuser
From now on out all maintenance of virtual users will be done using pure-pw, now lets go ahead and create our first user. As always, there are lots of options you can use when creating virtual users, we'll use a few in this example, but you can always get a full list by typing pure-pw --help at your terminal prompt, or by reading the README.Virtual-Users file included with the sourceball. So lets create a user call mike, issue the following command at your terminal prompt as root:
#pure-pw useradd test1 -u ftpuser -d /home/ftpusers/test1
Here we have added the virtual user test1, associated him with the system user account ftpuser, made sure he will only have access to his directory by chrooting him -d and told PureFTPd to create test1's home directory, which it will do on the fly as we started the service with the -j switch mentioned previously. Now before this account is usable we need to commit our changes, issue the following command at your terminal prompt to accomplish that:
This creates the file mentioned earlier called /etc/pureftpd.pdb, this file houses all information related to your virtual users, there is no need to restart your service when issuing this command as it is updated on the fly and changes take effect immediately. Lets say test1 forgot his password and wants it changed, here's what you'd do:
#pure-pw passwd test1
Enter test1's new password, then commit your changes by updating pureftpd.pdb:
Thats it, test1 is ready to go, now lets say test1 has become a liability and you want to get rid of him, just do the following:
#pure-pw userdel test1
This deletes test1's login, but not his home directory, directories must be deleted manually if desired. Ok, now that test1 was deleted, lets say we have another user named ruchi, and we want to check his current account settings, simply issue the following command:
#pure-pw show ruchi
PureFTPd shows you a listing of his current account settings as follows:
Login : ruchi
If you had set additional restrictions on ruchi's account via the options mentioned earlier such as quotas, bandwidth throttling, etc., you would see them listed here. Now lets assume you just want to see who is currently logged into your server, its as simple as this:
The command will execute and display a nice formatted list to your screen showing current users, time logged in, speed, originating IP address, etc., its a very nice command to have at your disposal if you run a busy server and you need to see who is doing what.
Basicall, you just add files that represent commandline options to a directory /etc/pureftpd/conf/. For instance, to configure a trusted GID for which no chrooting takes place, pure-ftpd provides the --trustedgid option. To enable this as a configuration option, you create a file named TrustedGID and put the GID in that file.
Create symlink to add PureDB to authentication methods
#ln -s ../conf/PureDB 50pure
Disable PAM authentication unless you need it
#echo no > /etc/pure-ftpd/conf/PAMAuthentication
Disable UNIX authentication unless you need it
#echo no > /etc/pure-ftpd/conf/UnixAuthentication
If you want know about more pureftp configuration options click here
If you want pureftpd server web interface or GUI tools click here