fix: DMS state volume must ensure `o+x` permission

This commit is contained in:
Brennan Kinney 2025-03-18 12:48:02 +13:00 committed by GitHub
parent 0362fa682e
commit 881e587e5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -95,6 +95,11 @@ function _setup_save_states() {
function _setup_adjust_state_permissions() { function _setup_adjust_state_permissions() {
[[ ! -d ${DMS_STATE_DIR} ]] && return 0 [[ ! -d ${DMS_STATE_DIR} ]] && return 0
# Parent directories must have executable bit set to descend the file tree for access,
# as each service running as a non-root user requires this to access their state directory,
# `/var/mail-state` must allow all users `+x`:
chmod o+x "${DMS_STATE_DIR}"
# This ensures the user and group of the files from the external mount have their # This ensures the user and group of the files from the external mount have their
# numeric ID values in sync. New releases where the installed packages order changes # numeric ID values in sync. New releases where the installed packages order changes
# can change the values in the Docker image, causing an ownership mismatch. # can change the values in the Docker image, causing an ownership mismatch.