Force Directory and File Permissions

chmod g+s is successfully applying the correct group for new folders however they are created without group having write permission.

Short version of this question would be to ask where in nextcloud is the folder created and could I add to that setting permissions correctly.

I mean I understand they are created with the www-data user and group normally but why wouldn’t I be able to set group write permissions as well.

This is an apache setup on ubuntu btw with ZFS pool.

TL