소스 검색

prosody: fix owner for /config dir

netaskd 6 년 전
부모
커밋
b8faa26e75
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      prosody/rootfs/etc/cont-init.d/10-config

+ 5 - 2
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