aboutsummaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-12-12 22:07:19 +0100
committerGravatar GitHub <noreply@github.com> 2025-12-12 22:07:19 +0100
commitb66d4ade4160b0f13efa4fb48a6c27884ad81804 (patch)
treeca72ea5bae862b4e845cb73c0d5a2017e1e7d92d /cli
parent73b37cdebecf52366f0959d4dec0753af69c44f4 (diff)
Improve Docker + compatibility Arch (#8299)
* Better comments in our Docker images * Make `cli/access-permissions.sh` compatible with other Apache groups such as `http` for Linux Arch * Better `/Docker/entrypoint.sh` supporting various Apache configuration paths (and slightly faster). * Add test image for Linux Arch (not sure we will keep it) See * https://github.com/FreshRSS/FreshRSS/pull/8279#issuecomment-3620674818
Diffstat (limited to 'cli')
-rwxr-xr-xcli/access-permissions.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/cli/access-permissions.sh b/cli/access-permissions.sh
index 1286d34aa..73ae54f35 100755
--- a/cli/access-permissions.sh
+++ b/cli/access-permissions.sh
@@ -22,8 +22,19 @@ fi
mkdir -p "${data_path}/users/_/"
+if getent group www-data >/dev/null; then
+ www_group="www-data" # Debian, Alpine
+elif getent group apache >/dev/null; then
+ www_group="apache" # Alpine
+elif getent group http >/dev/null; then
+ www_group="http" # Arch Linux
+else
+ echo >&2 '⛔ No Apache group {www-data, apache, http} found!'
+ exit 4
+fi
+
# Based on group access
-chown -R :www-data "$data_path" "$to_update"
+chown -R :$www_group "$data_path" "$to_update"
# Read files, and directory traversal
chmod -R g+rX "$data_path" "$to_update"