Shares permissions

I have recently purchased a My Cloud Mirror to use it as an afp storage I could access from either my internal network or from outside. After going through the setup (not the easiest on earth) what I found out is that my shares (let’s call them WD_UH and WD_UHSSD), which are NOT public, have their permissions set to 777 (rwxrwxrwx). Obviously, this is not something you want to allow on a NAS which is on the public internet.

I’ve tried to manually change the permissions, by ssh connection to the device, and that works, but every new file uploaded to the afp connected disks, still gets the 777 permissions. Even editing the /etc/netatalk/afp.conf file and setting the file and directory permissions to 770 (for example) doesn’t work, since afp.conf gets re-written every time MyCloud gets rebooted.

Has anyone managed to solve this permissions issue, and if so, how?

Help would be very much appreciated.

(P.S.: I am using Mac computers to access MyCloud, and I can mount the shares I have defined, and copy files to them, but the permissions are all messed up. All other services, smb, cloud access, Time Machine backups etc are all off).