I'm trying my darnedest to set up a samba server to share some directories for certain user groups. Several of the shares will be housing databases (incl. MS Access) which will be accessed by several users, often at the same time, and thus need to deal with both file-locking and group ownership. I have read that I need essentially the following in my smb.conf file: [lab] path = /usr2/lab available = yes public = yes guest only = no writeable = yes browseable = yes valid users = foonly, hart only user = no oplocks = No level2oplocks = No create mask = 770 directory mask = 770 force group = lab with the important lines being "create mask", "directory mask" and "force group". The problem is that while the "create mask" and "directory mask" lines work, the "force group" line does not, and the group "lab" is never forced for new files/directories created in that share. I have tried both "= lab" and "= +lab" (not really understanding the difference) and neither worked. I've had some samba experience in the past, but it has always been rudimentary (printer sharing, basic/non-readable file sharing) and trying to make this work is baffling me. Any advice would be mucho apreciated. (oh, and before anyone askes, yes, I'm SIGHUP'ing my smbd each time I change the config). -- Sam Hart University/Work addr. <hart@physics.arizona.edu> Personal addr. <criswell@geekcomix.com> end
John H Terpstra
2002-Dec-20 18:02 UTC
[Samba] "force group" not working with shared directories
On Fri, 20 Dec 2002, Sam Hart wrote:> I'm trying my darnedest to set up a samba server to share some directories > for certain user groups. Several of the shares will be housing databases > (incl. MS Access) which will be accessed by several users, often at the > same time, and thus need to deal with both file-locking and group > ownership. > > I have read that I need essentially the following in my smb.conf file: > [lab] > path = /usr2/lab > available = yes > public = yes > guest only = no > writeable = yes > browseable = yes > valid users = foonly, hart > only user = no > oplocks = No > level2oplocks = No > create mask = 770 > directory mask = 770 > force group = lab > > with the important lines being "create mask", "directory mask" and "force > group". > > The problem is that while the "create mask" and "directory mask" lines > work, the "force group" line does not, and the group "lab" is never forced > for new files/directories created in that share. I have tried both "= lab" > and "= +lab" (not really understanding the difference) and neither worked. > > I've had some samba experience in the past, but it has always been > rudimentary (printer sharing, basic/non-readable file sharing) and trying > to make this work is baffling me. > > Any advice would be mucho apreciated. (oh, and before anyone askes, yes, > I'm SIGHUP'ing my smbd each time I change the config).Set the directory SUID group and if you want forced user do SUID user also. Much preferred way instead of doing this in samba. It's a Unix file system issue, not a samba issue. - John T. -- John H Terpstra Email: jht@samba.org