Skip to content

Commit 8bdf77b

Browse files
committed
Locked down permissions for /etc/bind to absolutely needed ones, while still making sure mapped volumes have the needed permissions to start the container
1 parent b2983bd commit 8bdf77b

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 770 /etc/bind /var/cache/bind /var/run/named
9+
find /etc/bind -type f -exec chmod 640 -- {} +
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)