This tutorial focuses on how to setup vsftpd server on your linux based VPS or a dedicated server. The vsftpd stands for “Very Secure FTP Daemon”. It is not just secure as the name suggests but also delivers excellent performance by consuming less memory. The tutorial also teaches you how to configure by adding ftp users and locking the directory to individual users.
You can install vsftpd on Ubuntu / Debian, CentOS /Fedora and RHEL linux.
Installing vsftpd on Ubuntu or Debian
sudo apt-get install vsftpd
Installing vsftpd on CentOS / Fedora
yum install vsftpd
How to configure vsftpd:
Now that you’ve installed vsftpd, follow this procedure to configure it. These steps applies for both the linux variants.
Before you get started, stop the vsftpd by typing:
service vsftpd stop
Edit the vsftp.conf
In Ubuntu / Debian:
In Red Hat / CentOS
Make the following changes:
We don’t want anonymous login:
Enable local users:
The ftpuser should be able to write data:
Port 20 need to turned off, makes vsftpd run less privileged:
set umask to 022 to make sure that all the files (644) and folders (755) you upload get the proper permissions.
Now that basic configuration is complete, now let us begin with locking / securing a directory to user.