Merge pull request #2232 from nextcloud/enh/noid/fix-datdir-permissions

fix the datadir permission problems during install
This commit is contained in:
Simon L 2023-03-30 15:42:10 +02:00 committed by GitHub
commit 92dd734993
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 22 deletions

View file

@ -216,6 +216,12 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
fi
# We do our own permission check so the permission check is not needed
cat << DATADIR_PERMISSION_CONF > /var/www/html/config/datadir.permission.config.php
<?php
\$CONFIG = array (
'check_data_directory_permissions' => false
);
DATADIR_PERMISSION_CONF
php /var/www/html/occ config:system:set check_data_directory_permissions --value=false --type=bool
# Try to force generation of appdata dir:
@ -238,6 +244,9 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
fi
fi
# This autoconfig is not needed anymore and should be able to be overwritten by the user
rm /var/www/html/config/datadir.permission.config.php
# unset admin password
unset ADMIN_PASSWORD
@ -299,11 +308,6 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
done
fi
# Set the permission check to its default value again if not set
if [ "$SKIP_DATA_DIRECTORY_PERMISSION_CHECK" != yes ]; then
php /var/www/html/occ config:system:set check_data_directory_permissions --value=true --type=bool
fi
#upgrade
else
touch "$NEXTCLOUD_DATA_DIR/update.failed"