GetPageSpeed keeps NGINX and Varnish servers fast and secure: performance modules and builds, plus security fixes within days, all through routine
Free to install; commercial production use requires a subscription. Without one, a small license notice appears on HTML pages after 30 days.
dnf, yum or apt upgrades. It maintains the largest RPM repository of NGINX module packages and Varnish VMODs, with APT packages for Debian and Ubuntu.
Free to install; commercial production use requires a subscription. Without one, a small license notice appears on HTML pages after 30 days.
Operating System and Software
- Rocky Linux 8
Problem
-
On a default installation of TFTP server, using
getto retrieve files fails withError code 2: xxxx -
Attempt to retrieve a file using the relative path fails with
Error code 2: Only absolute filenames allowed.
# tftp localhost
tftp> get testfile
Error code 2: Only absolute filenames allowed
- Attempt to retrieve a file using the absolute path fails with
Error code 2: Forbidden directory.
tftp> get /var/lib/tftpboot/testfile
Error code 2: Forbidden directory
How to Fix
- The default installation of
tftp-serveron Rocky Linux 8 usessystemdinstead ofxinetdand does not require a config file to run. - Inspect any existing config files in
/etc/xinetd.d. - In this instance, a config file for
ftpdwas present in/etc/xinetd.d/ftpd. This interfered withtftpdand resulted in the errors displayed. - Removing the
ftpdconfig file then restartingxinetdresolved the issue.
Origin of the Problem
- An existing config file for
ftpdwas present in/etc/xinetd.d/ftpd.
Diagnostic Steps
- Install
tftp-serverandtftppackages on Rocky Linux 8.
# dnf install tftp-server tftp
- Start
tftpserver.
# systemctl start tftp
# systemctl status tftp
tftp.service - Tftp Server
Loaded: loaded (/usr/lib/systemd/system/tftp.service; indirect; vendor preset: disabled)
Active: active (running) since Thu 2020-07-09 10:46:07 BST; 5min ago
Docs: man:in.tftpd
Main PID: 27056 (in.tftpd)
Tasks: 1 (limit: 11482)
Memory: 376.0K
CGroup: /system.slice/tftp.service
└─27056 /usr/sbin/in.tftpd -s /var/lib/tftpboot
Jul 09 10:46:07 hostname.example.net systemd[1]: Started Tftp Server.
- Create test file in the default directory
/var/lib/tftpboot
# touch /var/lib/tftpboot/testfile
- Check UDP port for
tftpdis listening. This issue will only reproduce if the first entry displays the name of the servicein.tftpdandxinetd
# ss -pluton | grep ":69"
udp UNCONN 0 0 0.0.0.0:69 0.0.0.0:* users:(("in.tftpd",pid=10350,fd=0),("xinetd",pid=998,fd=6))
udp UNCONN 0 0 *:69 *:* users:(("systemd",pid=1,fd=220))
- Attempt to retrieve a file using the relative path fails with
Error code 2: Only absolute filenames allowed.
# tftp localhost
tftp> get testfile
Error code 2: Only absolute filenames allowed
- Attempt to retrieve a file using the absolute path fails with
Error code 2: Forbidden directory.
tftp> get /var/lib/tftpboot/testfile
Error code 2: Forbidden directory