named.service of bind9-next-32:9.19.9-2.fc36.x86_64 fails to start because it insists that "directory" option value (/var/named) must be writable, but SELinux policy (selinux-policy-36.17-1.fc36) reject the write access: led 30 09:22:48 island named[477789]: loading configuration from '/etc/named.conf' led 30 09:22:48 island audit[477789]: AVC avc: denied { write } for pid=477789 comm="named" name="named" dev="dm-1" ino=263222 scontext=system_u:system_r:named_t:s0 tcontext=system_u:object_r:named_zone_t:s0 tclass=dir permissive=0 led 30 09:22:48 island named[477789]: directory '/var/named' is not writable led 30 09:22:48 island named[477789]: /etc/named.conf:13: parsing failed: permission denied led 30 09:22:48 island named[477789]: loading configuration: permission denied led 30 09:22:48 island named[477789]: exiting (due to fatal error) led 30 09:22:48 island systemd[1]: named.service: Control process exited, code=exited, status=1/FAILURE led 30 09:22:48 island systemd[1]: named.service: Failed with result 'exit-code'. led 30 09:22:48 island systemd[1]: Failed to start named.service - Berkeley Internet Name Domain (DNS). # ls -ldZ /var/named drwxrwx--T. 5 root named system_u:object_r:named_zone_t:s0 4096 30. led 09.16 /var/named
Running with non-writeable working directory is not supported by upstream for quite a long time. We have changed the default value of SELinux boolean named_write_master_zones to on, which is the default. Unfortunately selinux boolean macros used in bind f36 package do not restore it back to default value, but to the value present when those macros were first used on that system. It should make additional action on bind uninstallation and call "setsebool -P named_write_master_zones on". I think it is more responsibility of bind package to reset it to working value. Or maybe even better to ignore that boolean altogether and change selinux-policy to always allow writing into /var/named, because all recent versions simply cannot work without it.
I confirm the cause is named_write_master_zones boolean. The boolean gets switched off when installing bind9-next with "dnf swap bind bind9-next". After manually enabling the boolean, bind9-next starts successfully.
This message is a reminder that Fedora Linux 36 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '36'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 36 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Still an issue even in the latest version
Still an issue in F37 too.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle. Changing version to 39.