N/A BONIAS

THE NETHERLANDS

Easily install and configure the VSFTPD server under Linux

The VSFTPD (Very Secure FTP Server Deamon) is one of the most commonly used FTP servers under Linux and comes with most Linux distributions.

 

This article will help you to easily install and configure the VSFTPD under Ubuntu-based (Debian-based in the larger sense) and Red Hat-based distributions.

 

Please note that this article does not provide for an extremely secure configuration but an easy and quick configuration. This configuration should be enough for an ftp server that will be used internally within an intranet and is protected by a firewall on its perimeter.

 

Please also note that, in this specific installation instruction, your system needs to be connected to the Internet to install the VSFTPD server.

 

Install the VSFTPD server

 

If you are either using Ubuntu or a Red Hat-related distribution, the installation of the VSFTPD server is surprisingly simple and easy to execute.

 

1 - You are using a Ubuntu-based distribution

If you are using an Ubuntu-based distribution, open a Terminal window and type the command sudo apt-get install vsftpd at the command prompt.

 

The installation program will first ask for root password.

 

The installation program will then contact the relevant repository servers and will estimate which files must be downloaded. You will be asked for approval once the installation program knows which files need to be downloaded.

 

Once you have given your approval, the files will be downloaded and the VSFTPD server will be installed.

 

The installation program will inform you at the end of the installation whether the installation has been completed with success.

 

2 - You are using a Red Hat-based distribution

If you are using a Red Hat-based distribution, open a Terminal window and type the command sudo yum install vsftpd at the command prompt.

 

The installation program will perform the same basic routine as described above for Ubuntu-based distributions.

 

Configure your new VSFTPD server

 

As is standard in Linux, the configuration is being done through configuration files that can be modified using a standard text editor.

 

In both Ubuntu-based and Red Hat-based distributions, the configuration file that must be modified resides in the same directory: /etc.

 

The file that you need to modify is called vsftpd.conf.

 

Open this file with any text editor that you prefer. Please note that, if you are not already logged as root, you will have to start your text editor with root privileges.

 

Uncomment the line local_enable=YES. This will enable existing local users on your Linux machine to log in through ftp.

 

Uncomment the line write_enable=YES. This will enable users to uload files.

 

You may wish to restrict users to their local directory; if this is the case, find and uncomment the line chroot_local_user=YES.

 

You can now save and close the file.

 

Start your new ftp server

 

The actions that you will have to take now depend on whether you are using a Ubuntu-based or a Red Hat-based distribution.

 

In both cases the commands below will restart your new ftp server and will make it directly available to users with a local account. If you wish to add a new ftp user, you will have to add a new Linux user.

 

1 - You are using a Ubuntu-based distribution

Open a Terminal window and type the command sudo /etc/init.d/vsftpd restart at the prompt.

 

2 - You are using a Red Hat-based distribution

Open a Terminal window and type the command sudo service vsftpd restart at the prompt.