Browse Source

如果存在/app目录则将其权限也修改了 (#392)

devome 3 years ago
parent
commit
0357cfbb1d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      docker/normal-rootfs/etc/cont-init.d/10-fixuser

+ 2 - 1
docker/normal-rootfs/etc/cont-init.d/10-fixuser

@@ -12,10 +12,11 @@ fi
 
 ## 兼容旧的缓存目录
 if [[ -d /app/cache ]]; then
+    chown -R ${PUID}:${PGID} /app
     if [[ -L /config/cache && $(readlink -f /config/cache) != /app/cache ]]; then
         rm -rf /config/cache &>/dev/null
     fi
     if [[ ! -e /config/cache ]]; then
-        ln -sf /app/cache /config/cache
+        s6-setuidgid ${PUID}:${PGID} ln -sf /app/cache /config/cache
     fi
 fi