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.
OMV_SAMBA_CREATEMASK="0644"
OMV_SAMBA_DIRECTORYMASK="2755"
OMV_SAMBA_SHARE_CREATEMASK="0644"
OMV_SAMBA_SHARE_DIRECTORYMASK="2755"
OMV_SAMBA_SHARE_FORCECREATEMODE="0644"
OMV_SAMBA_SHARE_FORCEDIRECTORYMODE="2755"
The above correspond to a umask of 0022.
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 :