aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-04-17 00:25:36 +0800
committerJesús <heckyel@hyperbola.info>2022-04-17 00:25:36 +0800
commitf674715a4c7d5fa0fe08ea019afc19689cd7e8ce (patch)
tree4c5cf83a080d726f22e2178d05e3d7e0e2bb264d
parent4c979bdce5884b434cd0c82a162163c1e5fded02 (diff)
downloadhyperbola-mirror-f674715a4c7d5fa0fe08ea019afc19689cd7e8ce.tar.lz
hyperbola-mirror-f674715a4c7d5fa0fe08ea019afc19689cd7e8ce.tar.xz
hyperbola-mirror-f674715a4c7d5fa0fe08ea019afc19689cd7e8ce.zip
Fix 403 error
-rw-r--r--entrypoint.bash8
1 files changed, 7 insertions, 1 deletions
diff --git a/entrypoint.bash b/entrypoint.bash
index 6b39101..5b6c276 100644
--- a/entrypoint.bash
+++ b/entrypoint.bash
@@ -26,7 +26,10 @@ source_url='${SOURCE_URL:-rsync://mirror.fsf.org/hyperbola/gnu-plus-linux-libre}
# Otherwise use the HTTP(S) URL from your chosen mirror.
lastupdate_url=''
-[ ! -d "\${target}" ] && mkdir -p "\${target}"
+[ ! -d "\${target}" ] && install -d -m755 "\${target}"
+
+# Set permission owner
+chown -R http:http "\${target}"
exec 9>"\${lock}"
/usr/bin/flock -n 9 || exit
@@ -65,6 +68,9 @@ rsync_cmd \
"\${source_url}" \
"\${target}"
+# Re-check permission
+chown -R http:http "\${target}"
+
# Cleanup
/bin/rm -f "\$lock"
exit 0