This brief tutorial is going to show you how to install and configure VSFTPD server in Ubuntu 13.04 Raring Ringtail. File Transfer Protocol (FTP) is a TCP protocol for uploading and downloading files between two networked computers. The machine with the FTP server installed on is considered the server.
A component of the FTP server called daemon continuously listen for FTP requests from the clients. When a request is received, the daemon checks the user’s login credentials and allows or denies the connection.
Access to the server can be managed in two ways: Anonymous and Authenticated.
In an anonymous mode, remote clients or users can access the server using the default account called anonymous and sending an email address as their password. Users are allow to only download content in this mode, although it can be changed to allow upload of content.
In an authenticated mode, users or remote clients can access the server with a pre-defined username and password. Only authenticated users are allowed to connect in this mode.
To get started with installing VSTFPD server in Ubuntu, run the commands below from the terminal or console in Ubuntu.
sudo apt-get install vsftpd
After installing, the server will automatically start and be configured with anonymous access but the anonymous login is disabled by default.
The main configuration file for VSFTPD is at /etc/vsftpd.conf. Open the configuration file and configure different settings for the server.
sudo vi /etc/vsftpd.conf
To allow anonymous login, make sure the line below is uncommented. To uncomment means to remove the # before each line.
anonymous_enable=YES
To disable anonymous login and only allow authenticated users to sign in, disable anonymous login and add the lines below.
local_enable=YES write_enable=YES
After making changes to the configuration file, you should always restart VSFTPD server. To do that, run the commands below
sudo service vsftpd restart
By default the root account is not allowed to use FTP service for security reasons. If you wish to allow the root account, remove the root username from this file /etc/ftpusers.
sudo vi /etc/ftpusers
Any username placed into this file will not be allow to access the server. Don’t forget to restart.
Remember, the most important file to configure and control VSFTPD server is the config file which can be access with the commands below.
sudo vi /etc/vsftpd.conf