this post was submitted on 28 Dec 2023
5 points (100.0% liked)

homelab

6589 readers
6 users here now

founded 4 years ago
MODERATORS
 

Workaround

I'm not sure what was going wrong with what I was doing initially, but, thanks to @[email protected], as suggested, I disabled the tftp server system service, and, instead, started it with the following command:

sudo in.tftpd -L /srv/tftp --verbose --permissive -s

and it then flashed successfully.

Original Post

cross-posted from: https://sh.itjust.works/post/11735447

I'm trying to flash firmware to a router (Archer C7) using TFTP, but, when the router makes the request for the firmware file over TFTP, the TFTP server responds with the following error

Error code: Access violation (2)
Error message: Only absolute filenames allowed

This is the config for tftpd in /etc/conf.d/tftpd:

TFTP_OPTIONS="-s"
TFTP_DIRECTORY="/srv/tftp"
TFTP_USERNAME="tftp"
TFTP_ADDRESS="192.168.0.66:69"

I have the firmware file in /srv/tftp, and both the firmware file, and /srv/tftp have chmod 777 permissions.

The TFTP server is running on Archlinux, and is installed as tftp-hpa from the arch repos.


If I test as a client, I can get it to download if I specify the full (absolute) path to the file /srv/tftp/filename, so it seems that the config isn't pointing the server to /srv/tftp as the relative path... How would I go about fixing that?

all 7 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 10 months ago* (last edited 10 months ago) (1 children)

I recently ran into the same issue flashing firmware on a Cisco Aironet 3700, the command I ended up using was sudo in.tftpd -L (directory) --verbose --permissive -s

I was running TFTPD on Fedora 38 on my laptop, though. I'm pretty sure I had the same issue you did, I think changing the command to in.tftpd fixed it, but I could be misremembering as this was about 6 months ago.

[–] [email protected] 2 points 10 months ago (1 children)

Thank you very much! Your suggested command worked. I still have no idea what was going wrong with what I was initially doing, but at least I have succesfully flashed the firmware. I ran the following command:

sudo in.tftpd -L /srv/tftp --verbose --permissive -s

and it succesfully flashed. It was a major relief to see the full data exchange on Wireshark instead of the afformentioned error that I had seen pop up a thousand times.

[–] [email protected] 2 points 10 months ago

I'm glad it helped!

[–] [email protected] 0 points 10 months ago (1 children)

The issue is caused because the tftpd-hpa --secure flag is not being used

TFTP_OPTIONS="-s"

[–] [email protected] 2 points 10 months ago

As shown in my post, I have that in my config. I have tried it with both -s, and --secure.