Alessandro Dotti Contra

Linux/Unix DevOps


Simple Samba share definition

This is a template configuration for a samba share. If you need to quickly share files between Windows, Linux or OSX clients it might be handy.

Please note that only the relevant options are listed... for a full and commented smb.conf file please refer to the official samba documentation.

[global]
...
unix extensions = no
...
[my_share]
path = /srv/shared/my_share
writable = yes
browseable = yes

#only users of this group can access
valid users = @developers

#this will be the group of files and directories
force group = developers

#create directories with rwxrwx--- permissions
directory mode = 0770

#create files with rw-rw---- permissions
create mask = 0660

The unix extensions parameters in the global section is needed because OSX 10.7 has the annoying habit of ignoring permission settings of the share configuration.