Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions prestart.d/00-set-cookie-permissions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

# Riak is sensitive to permissions on the erlang distribution cookie file.
# The ERTS requires that the cookie permissions are always 0600.
# In some environments, file permissions may change. For example, this
# can happen in kubernetes if the `fsGroup` option is used.

COOKIE_PATH="/var/lib/riak/.erlang.cookie"

if [ -e "$COOKIE_PATH" ]; then
chmod 0600 "$COOKIE_PATH"
fi