]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
convert-dns-settings: Set correct ownership after convert is done.
authorStefan Schantl <stefan.schantl@ipfire.org>
Fri, 10 Jan 2020 08:29:47 +0000 (09:29 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Fri, 10 Jan 2020 08:29:47 +0000 (09:29 +0100)
Otherwise it may happen, that the created config files have wrong
permissions and the WUI will break.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
src/scripts/convert-dns-settings [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index bacee66..de12b30
@@ -53,6 +53,9 @@ main() {
                fi
        fi
 
+       # Set correct ownership.
+       chown nobody:nobody /var/ipfire/dns/settings
+
        # Convert old unbound settings file
        if [ -e "/etc/sysconfig/unbound" ]; then
                local USE_FORWARDERS
@@ -81,6 +84,9 @@ main() {
 
                rm -f "/etc/sysconfig/unbound"
        fi
+
+       # Set correct ownership.
+       chown nobody:nobody /var/ipfire/dns/servers
 }
 
 main "$@" || exit $?