Writeable TFTP Server

Submitted by edwin on Wed, 12/08/2010 – 09:41

TFTP is used for example to back-up and restore network device configurations or firmware.

These steps are required to set up a writeable tftp server on Ubuntu server 10.04
1. sudo apt-get install tftpd-hpa
2. edit the file /etc/default/tftpd-hpa
$ sudo vim /etc/default/tftpd-hpa
the contents of the file should look like this,
# /etc/default/tftpd-hpa

TFTP_USERNAME=”tftp”
TFTP_DIRECTORY=”/var/lib/tftpboot”
TFTP_ADDRESS=”0.0.0.0:69″
TFTP_OPTIONS=”–secure –create”

3. Now change the permissions on /var/lib/tftpboot to allow everyone to write into it,
$ sudo chmod 777 /var/lib/tftpboot
4. restart the tftpd deamon
$ sudo service tftpd-hpa restart

And your done… Now you can install the package tftp on another linux machine and test if you can put a file onto the server.

$ sudo apt-get install tftp
$ touch test.text
$ tftp server-ip
tftp> put test.txt

Now check if the directory /var/lib/tftpboot on the tftp server contains the file test.txt

Advertisements
This entry was posted in Linux, 文摘. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s