sudo apt-get install proftpd
By default proftp configuration file is located under /etc i.e /etc/proftpd.conf
Change the following directives
ServerName — Configure the name displayed to connecting users
ServerName “proftp server”
ServerIdent — Set the message displayed on connect
ServerIdent on “Welcome to proftp server”
UseReverseDNS — Toggle rDNS lookups
UseReverseDNS off
IdentLookups — Toggle ident lookups
IdentLookups off
DefaultRoot — Sets default chroot directory
DefaultRoot ~
RequireValidShell — Allow connections based on /etc/shells
RequireValidShell off
MaxClients — Limits the number of users that can connect
DenyFilter — Regular expression of command arguments to be blocked
DenyFilter \*.*/
Maxclients 30
MaxClientsPerHost — Limits the connections per client machine
MaxClientsPerHost 50
sudo proftpd -td5 (checks configurations)
sudo /etc/init.d/proftpd restart
Create user
:/etc/proftpd$ sudo ftpasswd --passwd --name=labu
--uid=1010 --home=/home/ftp --shell=/bin/false
ftpasswd: --passwd: missing --gid argument: default gid set to uid
ftpasswd: creating passwd entry for user labu
ftpasswd: /bin/false is not among the valid system shells. Use of
ftpasswd: "RequireValidShell off" may be required, and the PAM
ftpasswd: module configuration may need to be adjusted.
Password:Enter password
Re-type password:Re-enter password
ftpasswd: entry created
------
:/etc/proftpd$ sudo ftpasswd --group --name=ftpd
--gid=1010 --member=labu --member=aura
ftpasswd: updating group entry for group ftpd
ftpasswd: entry updated
------
/etc/proftpd$ sudo vim proftpd.conf
Add these lines:
# Authentication using AuthUserFile
AuthUserFile /etc/proftpd/ftpd.passwd
# AuthOrder to use mod_auth_file.c only, no local user allowed
AuthOrder mod_auth_file.c
AllowOverwrite [ on|off]
sudo apt-get install ftp