diff --git a/write-server/entrypoint.sh b/write-server/entrypoint.sh index 9ea89c04..33e07af1 100644 --- a/write-server/entrypoint.sh +++ b/write-server/entrypoint.sh @@ -10,19 +10,8 @@ chown -R nextjs:nodejs /app/recycle /app/logs /app/backups # 修复博客目录权限(让 nextjs 用户可写) if [ -d "/blog" ]; then - chown nextjs:nodejs /blog -fi -if [ -d "/blog/content" ]; then - chown -R nextjs:nodejs /blog/content -fi -if [ -d "/blog/static" ]; then - chown -R nextjs:nodejs /blog/static -fi -if [ -d "/blog/.git" ]; then - chown -R nextjs:nodejs /blog/.git -fi -if [ -f "/blog/hugo.toml" ]; then - chown nextjs:nodejs /blog/hugo.toml + # 博客根目录及其所有文件 + chown -R nextjs:nodejs /blog fi # 配置 git(容器内 nextjs 用户)