Skip to content

Commit be5f801

Browse files
committed
Lock down permissions for /etc/bind to absolutely needed ones
1 parent b2983bd commit be5f801

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

container/entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ OPTIONS=$@
55
# The first time around, it will not be owned by named:named, and thus it won't be writable
66
chown -R root:named /etc/bind /var/run/named
77
chown -R named:named /var/cache/bind
8-
chmod 770 /var/cache/bind /var/run/named
9-
chmod -R 750 /etc/bind
8+
chmod -R 640 /etc/bind
9+
chmod 770 /etc/bind /var/cache/bind /var/run/named
1010
# By default - run in foreground and log to STDERR (console)
1111
# can be changed by running container with: -e "BIND_LOG=-f"
1212
exec /usr/sbin/named -c /etc/bind/named.conf $BIND_LOG -u named $OPTIONS

0 commit comments

Comments
 (0)