From 4a0f9ba183e6b908c660ed9798287279c26b861e Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Wed, 15 Nov 2023 10:25:23 -0800 Subject: [PATCH] go-vod: check for root (fix #916) Signed-off-by: Varun Patil --- go-vod/run.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/go-vod/run.sh b/go-vod/run.sh index 0feb5d2a..1e0d36f8 100755 --- a/go-vod/run.sh +++ b/go-vod/run.sh @@ -28,6 +28,13 @@ if [[ $HOST == http://* ]] && [[ -z $ALLOW_INSECURE ]]; then exit 1 fi +# Check if the current working directory is writable +if [ ! -w "." ]; then + echo "Current working directory is not writable." + echo "Are you in Docker and non-root (not supported)?" + exit 1 +fi + # build URL to fetch binary from Nextcloud ARCH=$(uname -m) URL="$HOST/index.php/apps/memories/static/go-vod?arch=$ARCH"