fix: Set salt home directory permissions

Closes #211
This commit is contained in:
Carlos Álvaro
2023-09-14 22:28:17 +02:00
committed by Carlos D. Álvaro
parent 1fd232ffc0
commit 8f55384986
4 changed files with 14 additions and 1 deletions

View File

@@ -4,6 +4,10 @@ This file only reflects the changes that are made in this image.
Please refer to the [Salt 3006.3 Release Notes](https://docs.saltstack.com/en/latest/topics/releases/3006.3.html) Please refer to the [Salt 3006.3 Release Notes](https://docs.saltstack.com/en/latest/topics/releases/3006.3.html)
for the list of changes in SaltStack. for the list of changes in SaltStack.
**3006.3_1**
- Fix salt home directory permissions. Issue #211
**3006.3** **3006.3**
- Upgrade `salt-master` to `3006.3` *Sulfur*. - Upgrade `salt-master` to `3006.3` *Sulfur*.

View File

@@ -5,7 +5,7 @@ ARG VCS_REF
# https://github.com/saltstack/salt/releases # https://github.com/saltstack/salt/releases
ENV SALT_VERSION="3006.3" ENV SALT_VERSION="3006.3"
ENV IMAGE_VERSION="${SALT_VERSION}" ENV IMAGE_VERSION="${SALT_VERSION}_1"
ENV SALT_DOCKER_DIR="/etc/docker-salt" \ ENV SALT_DOCKER_DIR="/etc/docker-salt" \
SALT_ROOT_DIR="/etc/salt" \ SALT_ROOT_DIR="/etc/salt" \

View File

@@ -108,3 +108,7 @@ apt-get clean --yes
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
export -n DEBIAN_FRONTEND export -n DEBIAN_FRONTEND
# Set home directory permissions
log_info "Setting ${SALT_USER} home directory permissions ..."
chown -R "${SALT_USER}:${SALT_USER}" "${SALT_HOME}"

View File

@@ -46,3 +46,8 @@ ok "salt-minion started"
salt "${TEST_MINION_ID}" test.ping || error "${TEST_MINION_ID} ping" salt "${TEST_MINION_ID}" test.ping || error "${TEST_MINION_ID} ping"
ok "${TEST_MINION_ID} ping" ok "${TEST_MINION_ID} ping"
# Test salt home permissions
# shellcheck disable=SC2016
docker-exec bash -c 'test $(stat -c "%U:%G" "${SALT_HOME}") = "${SALT_USER}:${SALT_USER}"' || error "salt home permissions"
ok "salt home permissions"