When writing newly created files and directories into Samba/CIFS shares via the protocol, the permissions on these will have default values that may not be appropriate for your use case. The defaults are 0664 for files and 0775 for directories. These defaults correspond to a umask of 0002.
These can be changed by editing /etc/default/openmediavault and adding these additional environment variables; the permissions values being chosen by you.
These values will be applied to all newly created files and directories written into all Samba/CIFS shares when written via the protocol.
After editing and saving the file run these commands in the shell:
If you want the values to apply on a per share basis instead of all shares, add these values into the Extra options box for the share in Services | SMB/CIFS :