1
0
mirror of https://github.com/docker-mailserver/docker-mailserver.git synced 2025-08-07 23:03:10 +02:00

open-dkim: use numerical uid and gid for chown (#4517)

Co-authored-by: Casper <casperklein@users.noreply.github.com>
This commit is contained in:
Andreas Perhab
2025-07-11 00:14:39 +02:00
committed by GitHub
parent 20798411a3
commit 337ae071d2
2 changed files with 5 additions and 3 deletions

View File

@ -152,8 +152,9 @@ function _generate_dkim_keys() {
# Ensure ownership is consistent for all content belonging to the base directory,
# During container startup, an internal copy will be made via `_setup_opendkim()`
# with ownership we expect, while this chown is for the benefit of the users ownership.
chown -R "$(stat -c '%U:%G' "${OPENDKIM_BASE_DIR}")" "${OPENDKIM_BASE_DIR}"
# with ownership we expect, while this chown is for the benefit of the users' ownership.
# use numerical uid and gid in case the owner of the directory does not exist inside container
chown -R "$(stat -c '%u:%g' "${OPENDKIM_BASE_DIR}")" "${OPENDKIM_BASE_DIR}"
}
# Prepare a file with one domain per line (iterated via while loop as DKIM_DOMAIN):