From 881e587e5cb7bc7727c1ddf83fc1cdad5007d613 Mon Sep 17 00:00:00 2001 From: Brennan Kinney <5098581+polarathene@users.noreply.github.com> Date: Tue, 18 Mar 2025 12:48:02 +1300 Subject: [PATCH] fix: DMS state volume must ensure `o+x` permission --- target/scripts/startup/setup.d/mail_state.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/scripts/startup/setup.d/mail_state.sh b/target/scripts/startup/setup.d/mail_state.sh index 34623859..d8e2c94c 100644 --- a/target/scripts/startup/setup.d/mail_state.sh +++ b/target/scripts/startup/setup.d/mail_state.sh @@ -95,6 +95,11 @@ function _setup_save_states() { function _setup_adjust_state_permissions() { [[ ! -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 # 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.