docker-bind
docker-bind copied to clipboard
DNS failing with error "loading configuration: permission denied"
After this commit DNS kept failing with the following error:
20-Jun-2020 the working directory is not writable
20-Jun-2020 loading configuration: permission denied
20-Jun-2020 exiting (due to fatal error)
This happens because bind9 9.16.1 needs to write some files into the current directory as the bind user. entrypoint.sh stays in the / directory, so it consistently fails. The old 9.11 didn't write to the current directory, so it didn't matter.
I fixed this locally by adding the following to entrypoint.sh:
mkdir /tmp/working_dir
chown ${BIND_USER} /tmp/working_dir
cd /tmp/working_dir
Hopefully this helps someone searching for a similar question.
For me what works was add this to my named.conf.options file
options {
directory "/var/cache/bind";
};
I was having the exact same error