Directory Privileges broken

Hi
I have pihole running on docker and have the directories mapped to a local harddrive. I have had an issue with the drive not mounting after a reboot and it seems to have changed the access permissions so that pihole can no longer access the directorys (pihole and dnsmasq.d). I have temp fixed it by giving pihole full access, but would like to set them properly, but cant find what they should be.

Also my database has a wierd user instead of pi
-rw-rw-r-- 1 999 spi 10035200 Jan 8 11:59 gravity.db

any help would be appreciated.

thanks

jack