linux samba share group write problem

Group write premission was not being allowed with the default samba server configuration. Very frustrating, I tried a zillion things with chmod and acl on the client mounted folder but nothing worked. Thanks to http://askubuntu.com/questions/210808/set-umask-set-permissions-and-set-acl-but-samba-isnt-using-those I fixed it.

Adding the following to the /etc/samba/smb.conf file for the folder I wanted shared solved the problem

create mask = 664
force create mode = 664
security mask = 664
force security mode = 664
directory mask = 2775
force directory mode = 2775
directory security mask = 2775
force directory security mode = 2775

So, as an example, I had the section:

[Office-Files]

path = /media/Office-Files
guest ok = yes
writeable = yes
create mask = 664
force create mode = 664
security mask = 664
force security mode = 664
directory mask = 2775
force directory mode = 2775
directory security mask = 2775
force directory security mode = 2775

Once smb.conf is change you need to restart samba

sudo service samba restart