seanism DOT com Random thoughts from the world of seanism

27Apr/123

TFTP in OS X Lion 10.7

In OS X Lion Apple changed how you access the TFTP server.  Below are the steps for editing the default location of the TFTP server and launching it.

  1. If you'd like to change the path the TFTP server uses you can create a directory wherever you'd like and name it tftp.  If not skip to step 3 but be aware you won't have direct access to the default folder location which is /private/tftpboot
  2. First let's edit the tftp.plist file to point to the new location
    1. Open up Terminal
    2. type  sudo nano /System/Library/LaunchDaemons/tftp.plist and press enter
    3. Type in your password
    4. Using the arrow keys move the cursor the the <string>/private/tftpboot</string> location.
    5. Replace the path <string>/private/tftpboot</string> with the location you chose.  I put <string>/Users/USERNAME/tftp</string>
    6. Press control + X and Y to save.
  3. Load and launch the TFTP server
    1. In Terminal type sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist and press enter
    2. Next type sudo launchctl start com.apple.tftpd and press enter

To confirm it is up and listening type netstat -a -p udp | grep tftp into the Terminal window and press enter.  You should see something similar to this...
udp6 0 0 *.tftp *.*
udp4 0 0 *.tftp *.*

If not then the daemon did not start correctly.  You may need to check the plist file for any errors.

I got some of my info from The Weezey Geek but felt it wasn't a complete tutorial.  I wrote this up to hopefully give people a start to finish guide on editing and starting the TFTP server.

Tagged as: , , , 3 Comments