diff --git a/src/middlewared/middlewared/plugins/smb_/util_smbconf.py b/src/middlewared/middlewared/plugins/smb_/util_smbconf.py index dcba698e05864..efb515d88f670 100644 --- a/src/middlewared/middlewared/plugins/smb_/util_smbconf.py +++ b/src/middlewared/middlewared/plugins/smb_/util_smbconf.py @@ -110,8 +110,8 @@ def generate_smb_conf_dict( 'netbios aliases': ' '.join(smb_service_config['netbiosalias']), 'guest account': smb_service_config['guest'] if smb_service_config['guest'] else 'nobody', 'obey pam restrictions': any(home_share), - 'create mask': smb_service_config['filemask'] or '0744', - 'directory mask': smb_service_config['dirmask'] or '0755', + 'create mask': smb_service_config['filemask'] or '0664', + 'directory mask': smb_service_config['dirmask'] or '0775', 'ntlm auth': smb_service_config['ntlmv1_auth'], 'server multichannel support': smb_service_config['multichannel'], 'unix charset': smb_service_config['unixcharset'], diff --git a/src/middlewared/middlewared/pytest/unit/plugins/test_smb.py b/src/middlewared/middlewared/pytest/unit/plugins/test_smb.py index d29bd0369a43b..b223d7ae185ae 100644 --- a/src/middlewared/middlewared/pytest/unit/plugins/test_smb.py +++ b/src/middlewared/middlewared/pytest/unit/plugins/test_smb.py @@ -232,6 +232,8 @@ def test__base_smb(): assert conf['idmap config * : backend'] == 'tdb' assert conf['idmap config * : range'] == '90000001 - 100000000' assert conf['server smb encrypt'] == 'default' + assert conf['directory mask'] == '0775' + assert conf['create mask'] == '0664' def test__syslog():