fix the datadir permission problems during install

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-03-30 10:54:56 +02:00
parent 9c0ea8a23c
commit 386533b02f
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"