diff --git a/scripts/restore-myapps.sh b/scripts/restore-myapps.sh index 632e605..eed0e00 100755 --- a/scripts/restore-myapps.sh +++ b/scripts/restore-myapps.sh @@ -264,6 +264,14 @@ else docker exec nextcloud-app php /var/www/html/occ config:system:set trusted_domains 2 --value="${VM_IP}:8082" docker exec nextcloud-app php /var/www/html/occ config:system:set trusted_domains 3 --value="localhost:8082" docker restart nextcloud-app + + # Fix permissions for oc_admin on nextcloud tables + docker exec nextcloud-postgres psql -U nextcloud -d nextcloud -c " + GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO oc_admin; + GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO oc_admin; + " 2>/dev/null || true + docker restart nextcloud-app + echo " ✅ Nextcloud trusted domains fixed" else echo " ⚠️ nextcloud-app not running"