Ownership on externa storage

Hello,
I installed NextCloud on Ubuntu Server. That works well.
I have to add an external storage so the owner group in “datagroup”.
The problem is that when I modify or add a file on this storage, it modify the owner group by “www-data”.
How do I prevent the owner group from being changed on this storage?
Thank you
Yannick

How is it configured?

Local external storage is directly handled by apache, therefore the apache-user must have access and all files created have this owner. If you run nginx+fastcgi, you can change the owner of the php process, in apache you can only use a different external storage, e.g. you pass via sftp and linked to this authentication you have the permissions set by sftp/linux system (or nfs, smb, …). Unfortunately it adds another layer of processes.