|Summary:||wrong permissions on /var/named directory|
|Product:||[Fedora] Fedora||Reporter:||Thomas Köller <thomas>|
|Component:||bind||Assignee:||Petr Menšík <pemensik>|
|Status:||CLOSED ERRATA||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Version:||27||CC:||bojan, e.lania, martin, mruprich, msehnout, pemensik, thozza, vonsch, zdohnal|
|Fixed In Version:||bind-9.11.4-1.fc27||Doc Type:||If docs needed, set a value|
|Doc Text:||Story Points:||---|
|Last Closed:||2018-07-31 17:10:15 UTC||Type:||Bug|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:||1574003|
Description Thomas Köller 2017-02-15 21:27:56 UTC
Description of problem: I have created a setup where named receives dynamic updates from dhcpd, so that host addresses assigned by dhcpd are properly resoved by named. I noticed that named logs write errors, apparently attempting to write temporary files, like this: Feb 15 21:55:26 sarkovy named: dumping master file: tmp-wSYzsbtsPq: open: permission denied Feb 15 22:00:16 sarkovy named: dumping master file: tmp-ylIaKgTlr2: open: permission denied So I reconfigured SELinux to allow named to write to its root directory (setsebool -P named_write_master_zones true) and changed the permissions on /var/named from 750 to 770. After this I got no more of the above errors, for as long as the system was running. However, after a reboot the permissions on /var/named were reset to 750, and the log messages were back. Version-Release number of selected component (if applicable): 9.10.4 How reproducible: Always Steps to Reproduce: 1. Change permissions on /var/named 2. Reboot 3. Actual results: Permissions are reset to 750 Expected results: Permissions should be unchanged Additional info: I tried to find a configuration parameter to instruct named to use a different place for its temporary files (possibly a subdirectory of /var/named, where writes are allowed by default), but could not find one. It appears to me that this behavior is not configurable.
Comment 1 Petr Menšík 2017-02-28 16:33:23 UTC
Hi, thanks for your report. Can you share more about your configuration, please? You can use named-checkconf -p to include all configuration. Note that /var/named is by not writeable by named by purpose. It is possible to move updated zones to /var/named/slaves or /var/named/dynamic, which are already configured to be modified by named?
Comment 2 Thomas Köller 2017-02-28 21:15:50 UTC
First off, it seems that my observation (/var/named access permissions being reset to 750 after a system restart), was somehow wrong. I restarted my system several times since, and did not observe this again, so the issue is probably void. As to whether named should be allowed to write to /var/named, however, I still think that it should be. If it were not, it would be unable to create or delete .jnl files, for example. Also, the Bind9 ARM states this (in paragraph 6.2, p. 126): 'For this reason among others, the working directory should be always be writable by named'. Relocating zone files to another directory writable by named, say /var/named/dynamic, may be possible. However, such a configuration would not be any more secure than allowing write access to /var/named, or would it?
Comment 3 Petr Menšík 2017-02-28 21:58:55 UTC
Unless you use also sticky bit (chmod +t /var/named), named will be able to delete any file in that directory. We want to prevent that. That is a reason why you have to manually enable it by sebool. Unless zone is managed by bind, it should not be able to modify it in any way. managed-keys.bind are by default in /var/named/dynamic by default, because managed-keys-directory option. There exists some cases with rndc addzone and rndc delzone that will not work unless home is writeable, but other cases should not require /var/named to be writeable by named. I was not able to reproduce your case. It did reset mode of /var/named after installation of bind-chroot however, I will have find a way to reproduce that. Maybe it will reset it only if setsebool -P named_write_master_zones false is used.
Comment 4 Fedora End Of Life 2017-11-16 19:48:36 UTC
This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. 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 Fedora 'version' of '25'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 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, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Comment 5 Fedora End Of Life 2017-12-12 10:19:47 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 6 Petr Menšík 2018-03-28 14:16:40 UTC
Reopening, as this is still accurate and requested by upstream.
Comment 7 Jan Kurik 2018-05-31 09:11:06 UTC
This bug is currently reported against a Fedora version which is already unsuported. I am changing the version to '27', the latest supported release. Please check whether this bug is still an issue on the '27' release. If you find this bug not being applicable on this release, please close it.
Comment 8 Fedora Update System 2018-06-27 17:46:19 UTC
bind-9.11.3-5.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0712169848
Comment 9 Fedora Update System 2018-06-28 12:32:50 UTC
bind-9.11.3-6.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-0712169848
Comment 10 Fedora Update System 2018-07-15 21:52:11 UTC
bind-dyndb-ldap-11.1-12.fc27 dnsperf-188.8.131.52-17.fc27 bind-9.11.4-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c0f12f789e
Comment 11 Fedora Update System 2018-07-16 18:05:20 UTC
bind-9.11.4-1.fc27, bind-dyndb-ldap-11.1-12.fc27, dnsperf-184.108.40.206-17.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c0f12f789e
Comment 12 Fedora Update System 2018-07-31 17:10:15 UTC
bind-9.11.4-1.fc27, bind-dyndb-ldap-11.1-12.fc27, dnsperf-220.127.116.11-17.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.