Okay I renamed to recover.bin
[drm@archlinux ~]$ sudo tftp 0.0.0.0
[sudo] password for drm:
tftp> status
Connected to 0.0.0.0.
Mode: netascii Verbose: off Tracing: off Literal: off
Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
tftp> get recover.bin
Transfer timed out.
tftp> q
Same thing, so, anyway, I went looking how to start another server and figured I should stop dnsmasq and stumbled upon it not running in the first place? Is that normal for the dnsmasq command for tftp since I don't need its DNS?
[drm@archlinux ~]$ systemctl status dnsmasq
○ dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; disabled; preset: disabled)
Active: inactive (dead)
Docs: man:dnsmasq(8)
but when I tried to activate it I got an error
[drm@archlinux ~]$ sudo systemctl start dnsmasq.service
Job for dnsmasq.service failed because the control process exited with error code.
See "systemctl status dnsmasq.service" and "journalctl -xeu dnsmasq.service" for details.
[drm@archlinux ~]$ systemctl status dnsmasq.service
× dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; disabled; preset: disabled)
Active: failed (Result: exit-code) since Fri 2024-10-11 09:29:39 CDT; 12s ago
Invocation: 0d8cc8025c32451787f55b4265ac798e
Docs: man:dnsmasq(8)
Process: 426563 ExecStartPre=/usr/bin/dnsmasq --test (code=exited, status=0/SUCCESS)
Process: 426565 ExecStart=/usr/bin/dnsmasq -k --enable-dbus --user=dnsmasq --pid-file (code=exited, status=2)
Main PID: 426565 (code=exited, status=2)
Oct 11 09:29:39 archlinux systemd[1]: dnsmasq.service: Scheduled restart job, restart counter is at 5.
Oct 11 09:29:39 archlinux systemd[1]: dnsmasq.service: Start request repeated too quickly.
Oct 11 09:29:39 archlinux systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
Oct 11 09:29:39 archlinux systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
So I went here and followed the instructions to edit the config file https://netbeez.net/blog/read-only-tftp-dnsmasq/ now I get new errors, woo, progress!
[drm@archlinux ~]$ systemctl restart dnsmasq
[drm@archlinux ~]$ cd /home/drm/srv/tftp
[drm@archlinux tftp]$ ls -l
total 6260
-rw-r--r-- 1 drm drm 6409144 Oct 7 17:00 recover.bin
[drm@archlinux tftp]$ sudo chown dnsmasq recover.bin
[drm@archlinux tftp]$ ls -l
total 6260
-rw-r--r-- 1 dnsmasq drm 6409144 Oct 11 09:58 recover.bin
[drm@archlinux tftp]$ tftp
(to) 0.0.0.0
tftp> get recover.bin
tftp: recover.bin: Permission denied
tftp> q
[drm@archlinux tftp]$ sudo tftp
(to) 0.0.0.0
tftp> get recover.bin
Error code 2: cannot access /home/drm/srv/tftp/recover.bin: Permission denied
tftp>
[drm@archlinux tftp]$ systemctl status dnsmasq
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; disabled; preset: disabled)
Active: active (running) since Fri 2024-10-11 09:58:00 CDT; 3min 49s ago
Invocation: 18761f2480844ea6b7e048ca0fd15aaa
Docs: man:dnsmasq(8)
Process: 458651 ExecStartPre=/usr/bin/dnsmasq --test (code=exited, status=0/SUCCESS)
Main PID: 458660 (dnsmasq)
Tasks: 1 (limit: 76846)
Memory: 852K (peak: 2.1M)
CPU: 48ms
CGroup: /system.slice/dnsmasq.service
└─458660 /usr/bin/dnsmasq -k --enable-dbus --user=dnsmasq --pid-file
Oct 11 09:58:00 archlinux systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Oct 11 09:58:00 archlinux dnsmasq[458651]: dnsmasq: syntax check OK.
Oct 11 09:58:00 archlinux systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
Oct 11 09:58:00 archlinux dnsmasq[458660]: started, version 2.90 DNS disabled
Oct 11 09:58:00 archlinux dnsmasq[458660]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset nftset auth>
Oct 11 09:58:00 archlinux dnsmasq[458660]: DBus support enabled: connected to system bus
Oct 11 09:58:00 archlinux dnsmasq-tftp[458660]: TFTP root is /home/drm/srv/tftp secure mode
Oct 11 09:58:00 archlinux dnsmasq-tftp[458660]: warning: /home/drm/srv/tftp inaccessible
Oct 11 09:59:53 archlinux dnsmasq-tftp[458660]: cannot access /home/drm/srv/tftp/recover.bin: Permission denied
strangely, after running sudo tftp the file changed to be 0 bytes, like it broke it. I think we're closer here than with tftpd-hpa, any idea what's wrong now?