create mask and
directory mask in
/etc/samba/smb.conf with the desired permissions.
# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
; create mask = 0700
# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
; directory mask = 0700
If you need more information there is a man page on smb.conf.
Regarding the values for the masking:
Permissions 700 means:
: The 1st octet are permissions for the owner.
r w x T : The 2nd octet are permissions for the group.
Owner: 4 2 1 7 : The 3rd octet are permissions for everyone else.
Group: 0 0 0 0 : For each octet, start at 0 and:
Other: 0 0 0 0 : +4 for read permission.
: +2 for write permission.
: +1 for execute permission.
So you need to figure out want permissions you need for the owner,group and others. Add the digits for read, write and execute for owner,group and other.
755 would r,w,x for owner; r,x for group and others.
777 would be r,w,x for all 3.
If you have problems with locks check if there is a *ldb file (that's the lock file) with permissions lower than 770. If their is check these settings and their values (values and workgroup are arbitrary):
force group = workgroup
force create mode = 0770
force directory mode = 0770
force security mode = 0770
force directory security mode = 0770
Samba will then create the *ldb file with rwxrwx--- and be able to remove the locks.