While migrating my linux-based server to Mac OS X Lion Server, I noticed it did not have a TFTP server enabled by default. A little googling pointed me to a blog post of The Weezey Geek, who outlined that everything is there, it’s just disabled.
I enabled the TFTP server as follows (which is slightly different from the post referred to below):
- edit /System/Library/LaunchDaemons/tftp.plist as root (sudo vi /System/Library/LaunchDaemons/tftp.plist)
<dict> <key>Disabled</key> <true/>
<dict> <key>Disabled</key> <false/>
- Next load the configuration with sudo launchctl load /System/Library/LaunchDaemons/tftp.plist
Which makes the change permanent and starts the TFTP daemon.
by default TFTPD uses /private/tftpboot as it’s root directory. To change this, modify the following fragment in /System/Library/LaunchDaemons/tftp.plist:
<array> <string>/usr/libexec/tftpd</string> <string>-s</string> <string>/private/tftpboot</string> </array>
To allow TFTP uploads, make sure that the directory to be uploaded to (be wise and make this a subdirectory of your TFTP root directory) is writable to all users.