Recently, I had the need to set up a share for the clients of a mixed
network environment. Nothing special, I just installed and set up a Linux
server with samba, configured the relevant users, groups and directory
and I was ready to go.
Since the most tricky part was to take care of the different behaviours of the many operating systems in play on the client side - Windows XP, Ubuntu Linux, Mac OsX 10.7 (Lion) and 10.6 (Snow Leopard), here is the definition of the share I configured.
This is just a quick note to self, since I don't use samba that
often anymore, but may be useful for other out there.
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
valid users = @developers #only users of this group can access
force group = developers #this will be the group of files and
#directories
directory mode = 0770 #create directories with rwxrwx---
#permissions
create mask = 0660 #create files with rw-rw----
#permissions
The unix extensions parameters in the global section is needed
because OsX 10.7 have the annoying habit of ignoring permission settings
of the share configuration.