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

Linux Questions

1149 readers
25 users here now

Linux questions Rules (in addition of the Lemmy.zip rules)

Tips for giving and receiving help

Any rule violations will result in disciplinary actions

founded 1 year 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

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?

top 4 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 11 months ago (1 children)

Is it asking you to specify /srv/tftp/filename even though you're in the directory?

[–] [email protected] 2 points 11 months ago* (last edited 11 months ago) (1 children)

That's what seems to be happening. The directory is specified in the config file, but it appears that it is being ignored? It should be able to accept a non-absolute path, and then map relative to the specified directory in the config file.

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

It probably won't help, but have you tried mapping tftp to / and going to the absolute path from there?

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

I set TFTP_DIRECTORY="/", and then restarted the service, but, unfortunately, it didn't work.