/etc/samba/smb.conf: why exists the "force create mode" and "force directory mode" parameters?

Hello Friends

About Samba I am reading the following valuable tutorial:

At the Step 2: Configuring Samba section appears the following configuration

comment= Network Shared Folder by Samba Server on Ubuntu
path = /home/your_username/sambashare
force user = smbuser
force group = smbgroup
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
public = yes
read only = no

Observe the relation about:

  • create mask with force create mode
  • directory mask with force directory mode

These two pairs of parameters have the same value.


  • Why the create mask and directory mask parameters are not enough by themselves? So why exists the force create mode and force directory mode parameters?

I’ve read in the official documentation of Samba the smb.conf(5) page, where it has the Explanation Of Each Parameter section. But for these two “force” parameters is not really clear the reason of their existence.