Nextcloud complaining about data directory permissions

Hello I’m running nextcloud in docker on a shared host. It keeps complaining that the data directory isn’t writable so I make it writeable then it complains everyone can read the data directory so then I make it not readable by everyone then it complains that I can’t write to it again. How do I make it ignore that it’s readable by everyone because other users can’t read other users directories and stuff

Please provide the specific permissions you have and changed it to, how you did it, etc.

It would also be helpful if you posted your Docker Compose file.