Did a fresh install of Ubuntu Trusty (14.04) and was excited to play with samba 4 (samba-4.1.6-Ubuntu).
As a small workgroup/stand alone samba server I wanted new files to be 0664 and new directories to be 2775. That’s how the old server was configured and OS X Mavericks played great with samba-3.x
Things worked as expected until I tried making new files from OS X Mavericks. No matter what I used for “create mask” and “force create mode”, the new files always ended up being 0644 and no matter what I used for “directory mask” and “force directory mode” directories ended up 0755.
Lots of Googling put me on false paths and dead ends. Finally putting a bunch of different posts together I came up with this.
create mask = 0664 force create mode = 0664 security mask = 0000 force security mode = 0664
directory mask = 2775 force directory mode = 2775 directory security mask = 0000 force directory security mode = 2775
This gives me the desired permissions on new files and directories. Just sharing with everyone else.