Setting Up FTP Server In Ubuntu 14.04 Using VSFTPD
Server is up without FTP, will you be using SSH all the time? Nah! Time to create an FTP Server for your clients to interact with files and data in your server. In this tutorial I will try to make things easier for you by God’s grace 🙂
I assume you are using Ubuntu 14.04 in this tutorial
- FTP users are just same with your Linux Users, now we are gonna create group and account for them, firstly the group
$ sudo groupadd ftp-users
Here am creating a group called ftp-users,
- Now let’s create an FTP user which I will be calling donjajo in this example and assign him to the group. But wait! let’s create a home for it first!
$ sudo mkdir /home/donjajo
Now create user, assign him group, shell and home
$ sudo useradd --group ftp-users --home /home/donjajo --shell /bin/nologin donjajo
Let me explain:
–group: Am adding the user to the group ftp-users
–home: Giving the user a home directory /home/donjajo
–shell: Assigning a shell for it, here I don’t like giving my FTP users shell access so am using /bin/nologin - Give the newly created FTP user a password right?
$ sudo passwd donjajo
and make sure he owns his home directory
chown -hR donjajo /home/donjajo
- Now done with user accounts and groups, install VSFTPD
$ sudo apt-get install vsftpd
- Before entering editing of the config files, let’s backup the existing one
$ sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.bak
then
$ sudo nano /etc/vsftpd.conf
- Set these if they ain’t set in yours
anonymous_enable=NO local_enable=YES write_enable=YES chroot_local_user=YES
- Save the conf file then restart vsftpd
$ sudo service vsftpd restart
Connect to your FTP Client Software with yourdomain.com:21 or IP:21 and login with the user details.
Hope this helps, use the comments if any issue