NCP provides following tool ncp-fix-permissions
. Have you tried this already?
Please read https://help.nextcloud.com/t/menu-configuration-reference-for-backups-config-networking-security-system-tools-updates/126011#nc-fix-permissions-71
Have you tried to add the domain via nc-trusted-domains
?
Please read https://help.nextcloud.com/t/menu-configuration-reference-for-backups-config-networking-security-system-tools-updates/126011#nc-trusted-domains-34
If your issues remain, please post the output of sudo ncp-report