WillyXJ / facileManager

A modular suite of web apps built with the sysadmin in mind.
www.facilemanager.com
GNU General Public License v2.0
85 stars 37 forks source link

[ISSUE] named.conf on Rocky Linux 8 server not being updated #577

Closed lravelo closed 1 year ago

lravelo commented 1 year ago

Please prefix your issue title with one of the following: [BUG], [ISSUE], [FEATURE REQUEST], [MODULE REQUEST], [OTHER].

Replace everything between stars with current version of your facileManager and module installations:
fM Version : 4.5.0 fmDNS Version : 5.3.3

In raising this issue, I confirm the following (please check boxes, eg [X]):


(BUG | ISSUE) Expected Behavior: I expect that when you run the server config build via the UI that it would update the named.conf file on the server

(BUG | ISSUE) Actual Behavior: Web UI says the build is successful (does also say the following: Notice: Undefined property: fmdb::$last_result in /var/www/html/fm-modules/fmDNS/classes/class_buildconf.php on line 154)

(BUG | ISSUE) Steps to reproduce: make a slight change on the server config via Config --> Servers --> . Does show the configuration is loadable. I then click Build Config which the UI reports is successful but /etc/named.conf remains the same. On the older servers that I have managed via fM the config, the experience is the same but the named.conf file is updated successfully.

If I run php /usr/local/facileManager/fmDNS/client/php -b -d I do see the right config being generated and then BIND is reloaded successfully

WillyXJ commented 1 year ago

Thanks for the PHP error as that will need to be fixed, but it is not the source of your reported issue. I don't have a Rocky test system, but if running the client manually is successful to update the configuration files and through the web UI it is not, I'd recommend looking in your /var/log files for any clues. I'm assuming you're using SSH as the update method based on #576 so check to see if there are any SSH or sudo messages in /var/log/messages and /var/log/secure.

You might've hit a bug.

lravelo commented 1 year ago

So after taking another look at this, it seems that it was editing the named.conf file over at /var/named/chroot/etc/named.conf instead of /etc/named.conf despite the fact that I wasn't running named-chroot. I did switch everything over to use named-chroot instead and it's working as configured. I'm guessing this might have happened due to the fact that I added a chroot directory in the UI even though I wasn't using it. Maybe a check for whether or not BIND is running in named.service or in named-chroot.service?