Set up an FTP Server in Ubuntu Linux

This article article will show you how to set up your own FTP server in Ubuntu Linux. FTP has a multitude of uses, such as setting up your own file storage website or your own file storage computer, among other purposes.

Steps

  1. Boot up Ubuntu Linux.
  2. Go to Application, then select Accessories and choose Terminal
  3. Enter the following command: “sudo apt-get install vsftpd” (without quotation marks). This will install the FTP server on your system. If you are logged in as the root user, the "sudo" command will not be necessary, since this command is used to give administrative privileges to the user. In this case, you will only need the command "apt-get install vsftpd".
  4. Open the FTP server configuration file. To do so, go to Places and click on Computer.
  5. In the file browser, click the “File System” icon.
  6. Click on the “etc” folder.
  7. Double-click the “vsftpd.conf” icon.
  8. Alter anonymous access. Enter "anonymous_enable=YES" (without quotation marks) to allow anonymous FTP access. The hash (#) at the beginning of each line indicates that this line is commented out and will be ignored. To enable this line, you must remove the hash (#). The parameter "write_enable=YES" (without quotation marks) will allow changes to the filesystem, such as uploading.
  9. Rename the FTP welcome banner. Uncomment it by removing the hash (#), and enter the welcome message. For this example it's "ftpd_banner=Welcome to FTP Server!" (without quotation marks).
  10. Click on Save and close the file. (Note: You may need to login as root, then only you will be able to open file in edit mode or else the file will open in read-only mode)
  11. To restart the FTP service, type the following command: “sudo /etc/init.d/vsftpd restart” (without quotation marks). Again, you will only need to use "sudo" if you are not logged as the root user.
  12. Place files on the FTP server. To move files to the server, access the FTP Folder from the command in the image above.

Tips

  • Set up your router to have port forwarding on the ports used by ftp (20 and 21 TCP). It must forward to the IP address of the ftp server. This applies to other services (such as email).
  • If you want to access your FTP site via the Internet, you can set up with a DynDNS (Dynamic Domain Name Server), so you don't have to remember your IP. You will need to update the IP of your home internet manually, or set a program (like inadyn) to do it for you.
  • It's a good idea to go through the whole of the configuration file, and read the documentation as far as it makes sense to you. FTP can be used for many different things, and this default configuration might not be exactly what you were looking for. Also, have a look on the Ubuntu support wiki.

Warnings

  • This tutorial only works locally, and files will be inaccessible over a remote connection.

Related Articles