In this post, we will learn how to install FTP server on a Ubuntu box. By default you cannot connect to your Ubuntu machine using FTP, but with the help of vsftpd this can be achieved. vsftpd, is an open source ftp server for Unix systems.

Installation

vsftpd is available as a ftp daemon in Ubuntu. You can install it by typing the following command in the terminal or shell.

sudo apt-get install vsftpd

Now that it is installed, its time to tune up or configure the server as per your need. Some common configurations are discussed below. The configuration file is located at /etc/vsftpd.conf. To edit the file open it in vi editor. Make sure you prefix sudo, otherwise you wont be able to save the changes. The first configurable variable is anonymous_enable, which lets you control the anonymous FTP login.

anonymous_enable=YES

By default the anonymous access to FTP is enabled in the configuration file. 90% you want to disable this since you do not want anyone to just FTP your system and can access files. So change YES to NO to disable anonymous access.

Uncomment the following configurations by removing “#” :

#local_enable=YES

#write_enable=YES

#anon_upload_enable=YES

Let us understand why you want to uncomment this configurations.  local_enable allows local users to login into the FTP server. On the other hand, uncommenting write_enable will allow users to edit and create new files, since by default the users have read-only access. anon_upload_enable allows anonymous users to upload files to FTP server.

So choose the configuration accordingly as it suits your need. Keep in mind that you have to restart your FTP server after making any changes to the config file. Because then only the new changes will reflect.

Hence to restart your FTP server, type the following command in the terminal :

sudo /etc/init.d/vsftpd restart

To shutdown the FTP server, type :

sudo /etc/init.d/vsftpd stop

To start the FTP server, type:

sudo /etc/init.d/vsftpd start

Now go and create your own FTP server. Hope that helps.

Stay digified !!
Sachin Khosla

Share this post: