Referring to the link:
MAC TFTP Page
http://takuya-1st.hatenablog.jp/entry/2016/02/27/030544
http://shantiworks.info/2013/10/30/mac-os-x%E3%81%AEtftp%E3%82%B5%E3%83%BC%E3%83%90%E3%82%92%E5%88%A9%E7%94%A8%E3%81%99%E3%82%8B/
launchctl Command Page
http://macwiki.osdn.jp/wiki/index.php/%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89/launchctl
TFTP needs file overwrite
http://hints.macworld.com/article.php?story=20070218233806794
"the files must already exist before writing to them"
Step1: MAC OS has pre-set TFTP program. It needs to be activated.
Step2: Create local folder for tftp repository.
Step3: replace "/private/tftpboot" with "your created local folder"
Step5: MAC's TFTP doesn't allow you to create a new file.
MAC TFTP Page
http://takuya-1st.hatenablog.jp/entry/2016/02/27/030544
http://shantiworks.info/2013/10/30/mac-os-x%E3%81%AEtftp%E3%82%B5%E3%83%BC%E3%83%90%E3%82%92%E5%88%A9%E7%94%A8%E3%81%99%E3%82%8B/
launchctl Command Page
http://macwiki.osdn.jp/wiki/index.php/%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89/launchctl
TFTP needs file overwrite
http://hints.macworld.com/article.php?story=20070218233806794
"the files must already exist before writing to them"
Step1: MAC OS has pre-set TFTP program. It needs to be activated.
Step2: Create local folder for tftp repository.
$ cd ~
$ mkdir TFTP
$ chmod 755 TFTP
$ echo hogehoge >> test.html
$ ls
test.html
Step3: replace "/private/tftpboot" with "your created local folder"
$ sudo vi /System/Library/LaunchDaemons/tftp.plist
Finish tftp:
$ sudo launchctl unload -w /System/Library/LaunchDaemons/tftp.plist
Start tftp:
$ sudo launchctl load -w /System/Library/LaunchDaemons/tftp.plist
Step4: Check port 69 is used for tftp service.
$ sudo lsof -i:69
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
launchd 1 root 42u IPv4 0x8464b2a1195f48b9 0t0 UDP *:tftp
launchd 1 root 44u IPv6 0x8464b2a1190da3a1 0t0 UDP *:tftp
launchd 1 root 48u IPv4 0x8464b2a1195f48b9 0t0 UDP *:tftp
launchd 1 root 49u IPv6 0x8464b2a1190da3a1 0t0 UDP *:tftp
Step5: MAC's TFTP doesn't allow you to create a new file.
$ ls -al
total 29416
drwxrwxrwx 5 aruba staff 170 10 12 14:37 .
drwxr-xr-x+ 31 aruba staff 1054 10 12 13:33 ..
-rw-r--r--@ 1 aruba staff 15056469 10 12 10:51 WB_16_02_0012.swi
-rw-r--r-- 1 aruba staff 0 10 12 14:37 start.cfg
$ touch start.cfg
$ chmod 666 start.cfg
$ ls -al
total 29416
drwxrwxrwx 5 aruba staff 170 10 12 14:37 .
drwxr-xr-x+ 31 aruba staff 1054 10 12 13:33 ..
-rw-r--r--@ 1 aruba staff 15056469 10 12 10:51 WB_16_02_0012.swi
-rw-rw-rw- 1 aruba staff 0 10 12 14:37 start.cfg
-rw-r--r-- 1 aruba staff 10 10 12 13:27 test.html
Notes: If you use "/private/tftpboot" folder, you get errror message with no permission error.
$ tftp localhost
tftp> get test.html
tftp: test.html: Permission denied
Comments
Post a Comment