vsftpd is a lightweight, efficient FTP server written for security, supports both anonymous and non-anonymous FTP access, PAM authentication, bandwidth limiting, and the Linux sendfile() facility. This tutorial will explain how to easily install and setup ftp server in Ubuntu using vsftpd.

  • 1. Install vsftpd

    Search and install vsftpd in Ubuntu Software Center, or execute this command in terminal(Ctrl+Alt+T):

    sudo apt-get install vsftpd
  • 2. Once installed vsftpd, it creates ‘/srv/ftp’ as ftp HOME folder. You can change it by editing /etc/passwd,
    sudo gedit /etc/passwd

    find out this line (should at end):

    ftp:x:118:127:ftp daemon,,,:/src/ftp:/bin/false

    Change ‘/src/ftp’ to the directory you want to use as ftp HOME folder.

  • 3. configure vsftpd

    Edit the configuration file /etc/vsftpd.conf with your favorite editor, here I use:

    sudo gedit /etc/vsftpd.conf

    remove # and set the value to what you want to enable

    • anonymous_enable=YES # allow anonymous visit
    • write_enable=YES # allow upload
    • anon_upload_enable=YES # allow anonymous upload
    • anon_mkdir_write_enable=YES # allow anonymous create folder
    • local_enable=YES # allow local user login
  • 4. After configure vsftpd, restart the service.

    In terminal, run this to restart vsftpd service:

    sudo /etc/init.d/vsftpd restart

Now open up a web browser and test it out