A FTP Server will be very useful for those who run a personal website and those who want to upload some large files/directories and download them using a FTP Client. Ubuntu doesn't come with FTP server as a pre-installed package, but you can create one by installing the most popular FTP server on Linux platform- VSFTPD. This tutorial explains how FTP (VSFTPD) Server is installed and configured in Ubuntu and how data can be uploaded to and downloaded from your FTP server.
Here we go!
Step 1: Installation of FTP (VSFTPD) Server
To Install a FTP Server on your Ubuntu System, open the terminal by pressing 'Ctrl + Alt + T' and run the following command:
sudo apt-get install vsftpd
Step 2: Configuring the FTP Server
Note: '#' Symbols are used to comment a line. Whenever you wish to edit a line in order to make some changes, make sure the you remove the '#' symbol to uncomment that line.
After installing the FTP Server, you will need to configure it by editing a configuration file /etc/vsftpd.conf using your favorite text editor.
sudo gedit /etc/vsftpd.conf
Enable/Disable Anonymous FTPFind the line - anonymous_enable. You can enable/disable the anonymous FTP access by editing this line as follows:
To enable anonymous FTP access,
Allowing Access to Local UsersFind the line- local_enable. To allow access to local users, edit the line as follows:
Permitting Users to Upload FilesFind the line- write_enable. To let users upload their data on the server, edit the line as follows:
|Configuration of FTP Server - 1|
The Welcome Banner!Find the line- ftp_banner and edit it with your welcome message.
ftpd_banner=Welcome to YourOwnLinux FTP Server!!
Once you are done with these things, save the file and exit from the editor.
|Configuration of FTP Server - 2|
Step 3: Restart the FTP ServiceIn order the changes made by you to the configuration file to make effects, you need to restart the FTP service by entering following command:
sudo /etc/init.d/vsftpd restart OR sudo service vsftpd restart
Step 4: Uploading/Downloading Files to and from the FTP Server
These things are too simple! You just need to put the files you want to upload in a folder- /srv/ftp either using command line (like cp and mv commands) or graphical utilities (like cut-paste, drag-n-drop).
To download data from a FTP Server, you can use wget command.