From 28b4b2036e8061cd1cbb9a711fbd55ff3400426c Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Mon, 15 Apr 2024 21:49:53 +0200 Subject: [PATCH] fix #2619 (#2620) * part fix #2619 make sure the bin is exceutable Signed-off-by: Daniel Hansson * one solution for all files Signed-off-by: Daniel Hansson * Update nextcloud_update.sh Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Daniel Hansson * Update nextcloud_update.sh Signed-off-by: Daniel Hansson * tested and works Signed-off-by: Daniel Hansson --------- Signed-off-by: Daniel Hansson Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- nextcloud_update.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/nextcloud_update.sh b/nextcloud_update.sh index 90b0672d75..699fd30135 100644 --- a/nextcloud_update.sh +++ b/nextcloud_update.sh @@ -725,6 +725,10 @@ fi print_text_in_color "$IGreen" "Disabling maintenance:mode..." sudo -u www-data php "$NCPATH"/occ maintenance:mode --off +# Make all previous files executable +print_text_in_color "$ICyan" "Finding all executable files in $NC_APPS_PATH" +find_executables="$(find $NC_APPS_PATH -type f -executable)" + # Update all Nextcloud apps if [ "${CURRENTVERSION%%.*}" -ge "15" ] then @@ -760,15 +764,16 @@ else print_text_in_color "$IGreen" "Your apps are already up to date!" fi +# Nextcloud 13 is required. +lowest_compatible_nc 13 + # Restart notify push if existing if [ -f "$NOTIFY_PUSH_SERVICE_PATH" ] then - systemctl restart notify_push + chmod +x "$NC_APPS_PATH"/notify_push/bin/x86_64/notify_push + systemctl restart notify_push.service fi -# Nextcloud 13 is required. -lowest_compatible_nc 13 - if [ -f /tmp/minor.version ] then NCBAD=$(cat /tmp/minor.version) @@ -1247,6 +1252,12 @@ then mkdir -p "$VMLOGS" fi +# Make all files in executable again +for executable in $find_executables +do + chmod +x "$executable" +done + CURRENTVERSION_after=$(nextcloud_occ status | grep "versionstring" | awk '{print $3}') if [[ "$NCVERSION" == "$CURRENTVERSION_after" ]] || [ -n "$PRERELEASE_VERSION" ] then