From b8faa26e755b5cd49bbd5ad08e84978a03e95d1a Mon Sep 17 00:00:00 2001 From: netaskd Date: Tue, 19 Feb 2019 12:14:48 +0300 Subject: [PATCH] prosody: fix owner for /config dir --- prosody/rootfs/etc/cont-init.d/10-config | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/prosody/rootfs/etc/cont-init.d/10-config b/prosody/rootfs/etc/cont-init.d/10-config index b55a4d5..f3e7173 100644 --- a/prosody/rootfs/etc/cont-init.d/10-config +++ b/prosody/rootfs/etc/cont-init.d/10-config @@ -3,8 +3,11 @@ PROSODY_CFG="/config/prosody.cfg.lua" if [[ ! -d /config/data ]]; then - mkdir -p /config/data - chmod 777 /config/data + mkdir -pm 750 /config/data +fi + +if [[ "$(stat -c %U /config)" != "prosody" ]]; then + chown -R prosody /config fi if [[ ! -f $PROSODY_CFG ]]; then