post-image
Internet

Install and configure a FTP Server using proftp in Ubuntu and Debian


FTP servers allow you to create an FTP connection to transfer files between your local computer and a web server. ProFTPD is a very customizable and very efficient FTP server for Unix / Linux, its free and open source, released under the GPL license.

Installing a FTP Server using ProFTPD in Debian and Ubuntu

In this tutorial we are going to install an FTP server on a machine running Debian 8, my goal is to use it for backups but you can give it whatever use you want.

Step 1. Install ProFTPD server

First we make sure that all our packages are updated


$ sudo apt-get update
$ sudo apt-get upgrade

Next we install ProFTPD:


$ sudo apt-get install proftpd

At the time of installation the program will ask what kind of installation we want to perform, in most cases you should choose «standalone».

Instalar y configurar un servidor FTP con ProFTPD en Debian y Ubuntu

Step 2. Configure ProFTPD Server

In order to use it we must edit some files, the default configuration for Debian and Ubuntu is in /etc/proftpd/proftpd.conf, we go to file:


$ sudo nano /etc/proftpd/proftpd.conf

proftpd_config

Now we must edit the following values:

  • ServerName: Name of the server.
  • UseIPV6: We change it to «Off», in case you do not need it.
  • DefaultRoot : Uncomment this line, this keeps the users in their root directory, thus avoiding that they can see other files of the system.
  • RequireValidShell: Uncomment this line and change it to «On» to enable user login, even for those who do not have a valid shell.
  • AuthOrder: Uncomment this line to enable the use of local passwords.
  • PassivePorts Uncomment this line, unless it is necessary to leave the ports by default (may require the configuration of your firewall)
  • Port: This line defines the default port used by FTP, you can leave it by default at 21 or change it to another value if you want more security.
  • SystemLog: Path where the logs are saved.

After configuring, we check and save, if we are using nano Control + X and then Shift + Y to save.

IF we are using vi, press «ESC» and then write 😡 to save and exit.

Restart the ProFTPD server:


$ sudo service proftpd restart

Step 2. Users

At the time of installation the program creates a user called proftpd by default, this user does not serve us much so we will create our own user and we will assign the directory «var / www», assuming that this is the root of your web server .

We create the user:


$ sudo useradd miusuario

We set


$ sudo passwd miusuario

We assign the default dir «/var/www»:


$ sudo usermod -m -d /var/www/ miusuario

Finally we restart the ProFTPD server:


$ sudo service proftpd restart

You can now use any FTP client to access your FTP server.

FTP CLIENTS:

[download]Filezilla: Link [/download]

[download]WinSCP: Link [/download]

 

That’s it, if you have any problems, you can use the comments.

 

Cheers!

Hugo Loza
Sigueme...!

Fanático de la tecnología, Resumido: linux, servidores, programación, diseño web, star wars. "Conocimiento y habilidad por encima del conformismo"

View Comments
There are currently no comments.

¿Tienes alguna consulta o comentario? Hazla ahora mismo!