Installing VSFTPD in Ubuntu 14.04/16.04 Servers

Spread the love

Installing and Configuring VSFTPD ftp server in CentOS and Ubuntu based systems

VSFTPD Installation on Ubuntu 14.04/16.04 :

Install the FTP server using the following command.
apt-get -y install vsftpd

Configuring VSFTPD Server :

Open the vsftpd Configuration File.

vim /etc/vsftpd.conf


# Make sure PORT transfer connections originate from port 20 (ftp-data).

# if you get 500 Internal error for ftp server add following line.

# if you get login incorrect error edit the pam_Service_name to ftp from vsftpd

make the above changes and save the file

Now Create the FTP user :

useradd -d ‘/var/www/html’ -s /sbin/nologin ftpuser

change the password for the user.
passwd ftpuser

Now give all permissions on the home directory

chown -R ftpuser ‘/var/www/html/’
chmod 775 ‘/var/www/html/

Add to ftpusers group

groupadd ftpusers
usermod -G ftpusers ftpuser

Open the firewall port 21 for FTP
ufw allow 21

Now restart the vsftpd server
sudo service vsftpd restart

Then try to connect to the FTP server using any FTP client such as FileZilla with the ftpuser credentials.

Venkatesh Macha

Hi Guys, I am Venkatesh Macha. I am a programmer and an Open Source enthusiast, Presently working as a Software Engineer. Apart from that, I love to explore new technologies and things.

You may also like...

2 Responses

  1. If anybody gets Apache 403 forbidden Error,

    Use /etc/vsftpd.conf


  2. D Stevens says:

    Re user creation: in Ubuntu 14.04.2 LTS, there is no script /sbin/nologin; you will need to use /usr/sbin/nologin instead.

Leave a Reply