= Background = A network administrator may find the need to deploy a TFTP server quickly and cost effectively. The reader may find that there is more than one TFTP server package available for Ubuntu systems. {{{ apt-cache search tftpd }}} including tftpd, atftpd, and tftpd-hpa. tftpd-hpa was chosen in this scenario because of its relative "up-to-date-ness" and availability of documentation. = Introduction = This document will guide the reader on how to setup a TFTP server that will allow clients to both download and upload files.<
><
> (This process has been completely tested and verified on 11/18/2015 using Ubuntu 14.04.3 Server and the latest version of tftpd-hpa available from the apt repositories (tftpd-hpa_5.2-7ubuntu3_amd64.deb)) = Installation = {{{ sudo apt-get install tftpd-hpa. }}} Once the installation is complete, you will have a running TFTP server on your system that will be listening on all active network interfaces, on both IPv4 and IPv6. All you will be able to do is download files from the TFTP server. Uploading will not work. We will fix that in the Configuration section below.<
> You can confirm this by running... {{{ sudo service tftpd-hpa status }}} and/or {{{ netstat -a | grep tftp }}} The default configuration file for tftpd-hpa is '''/etc/default/tftpd-hpa'''.<
> The default root directory where files will be stored is '''/var/lib/tftpboot'''.<
> = Configuration = == Edit tftpd-hpa Configuration File == As mentioned before, all you will be able to do at this point is download files from the TFTP server. If you want to upload to the TFTP server, read on. To begin with, make a copy of the default tftpd-hpa configuration file. {{{ sudo cp /etc/default/tftpd-hpa /etc/default/tftpd-hpa.ORIGINAL }}} Then, edit the tftpd-hpa configuration file. {{{ sudo vi /etc/default/tftpd-hpa }}} and change the line that reads... {{{ TFTP_OPTIONS="--secure" }}} to {{{ TFTP_OPTIONS="--secure --create" }}} and save the file and exit the vi editor. == Modify Permissions on TFTP Root Directory == The root directory where files must be stored in order to access them via TFTP is '''/var/lib/tftpboot'''. If you want to be able to upload to that directory, then perform the following command. {{{ sudo chown -R tftp /var/lib/tftpboot }}} == Restart the tftpd-hpa Service == To make the changes take effect, the tftpd-hpa service must be restarted. This can be accomplished by performing the following command. {{{ sudo service tftpd-hpa restart }}} At this point you should now have a TFTP server that allows you to both download and upload files. = Additional Information = tftpd-hpa seems to be somewhat tied to traditional tftpd. For more information try... {{{ man tftpd }}} = External Links = An external links section can be used to point users towards general information about the subject matter of the page, such as a [[http://en.wikipedia.org|wikipedia]] entry or project homepage. This section is optional. * http://chschneider.eu/linux/server/tftpd-hpa.shtml - The first "how to" that I used to go through this process. * http://askubuntu.com/questions/443117/how-to-configure-tftpd-hpa-to-allow-upload-of-new-files - The final link that lead me to discover the process of allowing uploads.