[Samba] "force group" not working with shared directories

John H Terpstra jht at samba.org
Fri Dec 20 18:02:01 GMT 2002

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 at samba.org

More information about the samba mailing list