Today I want to share steps on how to install & configure ftp server on Ubuntu.
The server that I’ll use is vsftpd.

1. Make sure your OS is updated

apt-get update
apt-get upgrade

2. Install vsftpd

apt-get install vsftpd

3. Edit the vsftpd config file

vi /etc/vsftpd.conf

Copy this line below:

# Example config file /etc/vsftpd.conf
#
listen=YES
anonymous_enable=NO       # Allow anonymous FTP?
local_enable=YES                # Allow local users to log in
write_enable=YES                # Enable any form of FTP write command
dirmessage_enable=YES      # Activate directory messages
use_localtime=YES
xferlog_enable=YES            # Activate logging of uploads/downloads
connect_from_port_20=YES

secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem

local_root=/usr/share/nginx/www/       # Specifies the directory vsftpd changes to after a user logs in
userlist_enable=YES                             # If user tries to log in using a name in this file, they will be denied before they are asked for a password
userlist_file=/etc/user_list                     # Path to userlist_file

You can change local_root dir to your preferred  that you want.

4. Edit ftpusers file

vi /etc/ftpusers

Comment in-front of word root.

5. Create new file for user_list but do not fill anything

touch /etc/user_list

6. Restart the vsftpd

service vsftpd restart

Done. Hope it helps. 🙂

By zam

Any Comments?

This site uses Akismet to reduce spam. Learn how your comment data is processed.