Wednesday, July 27, 2011

Using the OS X built-in tftp server

I needed to configure some devices on the go and as long as you have a Mac handy you can do it without any additional software. I found details on another site but the /sbin/service they used didn't seem to exist on my machine but after a little more Googling I found this is the command to start the tftp server on OS X 10.7 Lion...

sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist
sudo launchctl start com.apple.tftpd


The default tftp file path is /private/tftpboot but you can change that by editing /System/Library/LaunchDaemons/tftp.plist and re-starting with launchctl...

sudo launchctl restart com.apple.tftpd

3 comments:

Arsenio said...

Thanks!!!

Bejaysus said...

What pisses me off no end it the way TFTPD won't let you upload file unless there is a file with name in the directory already. Is there any alternative to this?

DanHammans said...

Yes, just change the tftproot directory to something else that you have write permissions to. You can change the tftproot in the property list file, just open it with your favorite text editor.