Merge pull request #5238 from dokku/storage-perms

Respect dokku system user/group when setting storage permissions on installation
This commit is contained in:
Jose Diaz-Gonzalez
2022-07-05 14:16:28 -04:00
committed by GitHub

View File

@@ -5,9 +5,9 @@ set -eo pipefail
trigger-storage-install() {
declare desc="storage install trigger"
declare trigger="install"
local storage_directory="${DOKKU_LIB_ROOT}/data/storage"
mkdir -p "${storage_directory}"
chown dokku:dokku "${storage_directory}"
mkdir -p "${DOKKU_LIB_ROOT}/data/storage"
chown "${DOKKU_SYSTEM_USER}:${DOKKU_SYSTEM_GROUP}" "${DOKKU_LIB_ROOT}/data/storage"
STORAGE_SUDOERS_FILE="/etc/sudoers.d/dokku-storage"
local mode="0440"