Permission issues
tmatthews5511 opened this issue · 4 comments
This did not work for me. I kept getting permission issues in /tftpboot which stopped it from working.
This seems to be a very serious bug with dnsmasq and it seems that nobody cares about this bug as well.
After a few hours of agony, I think I found it -- You cannot use /tftpboot (permission denied, even as root).
Instead, I had to go to /srv/tftpboot/. And I did chmod 777 on the whole /srv/tftpboot/ dir.
Hi
can you let me know the version of your OS and dnsmasq installed. and whether you have SELinux enabled on the server?
I tested in the environment below and had no issue with using /tftpboot. perhaps you are using an OS different to CentOS?
[root@pxeboot ~]# uname -a
Linux pxeboot.homelab.net 3.10.0-1160.66.1.el7.x86_64 #1 SMP Wed May 18 16:02:34 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
[root@pxeboot ~]# rpm -qa dnsmasq
dnsmasq-2.76-17.el7_9.3.x86_64
[root@pxeboot ~]# getenforce
Enforcing
Yes, I am using a more up-to-date OS instead of using CentOS 7. I am using OpenSuse 15.3 (the latest version of the non-rolling release).
It would be interesting to see if RHEL 9 (or Alma/Rocky) would allow the /tftpboot. OpenSuse did not seem to allow this (maybe I made some silly error?), and I had to create a /srv/tftpboot/ which has worked so far.
The second part which I need to do now is to create the http boot -- instead of using CentOS 7, I will try a more update OS as well.
NAME="openSUSE Leap"
VERSION="15.3"
Dnsmasq version 2.86 Copyright (c) 2000-2021 Simon Kelley
Compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 Lua TFTP conntrack ipset auth cryptohash DNSSEC loop-detect inotify dumpfile
@tmatthews5511 its because selinux is set to enforcing. you need to change it to permissive.
https://www.thegeekdiary.com/rhel-7-rhcsa-notes-set-enforcing-and-permissive-modes-for-selinux/