Setup vsFTPd on Linux

When you need a FTP server we recommend  vsFTPd which is a lightweight FTP server. This is a short tutorial explaining how to setup vsftpd on Debian, Ubuntu or CentOS.

Step 1: Installation

Run the following command to install vsftpd:

sudo apt-get install vsftpd

Step 2: Configuration

Open up the configuration file using your text editor of choice

sudo nano /etc/vsftpd.conf

To enable uploading, un-comment the following line:

write_enable=YES

Save the file and close your text editor. Then start vsftpd as a daemon:

service vsftpd start

At this point, you can log in your ftp server using a FTP client such as FileZilla, WinSCP or your file or web browser

Extras

If you want to prevent all local users from leaving their home directory, you need to un-comment this line from /etc/vsftpd.conf

chroot_local_user=YES

From vsftpd version 2.3.5, the chroot directory must not be writable. You can change the permissions of this folder with the following command:

chmod a-w /home/user

Remember to restart the vsftpd daemon after editing vsftpd.conf.

service vsftpd restart

Still need help? Contact Us Contact Us