I am having difficulty with samba shares. The situation is that we have two groups. group 2 needs to have access to some subfolders and group 1 needs to have access to all subfolders on a single samba share (this is extremly important - it can't be two mount points for group 1 as it is causing linking problems with a cross-platform application we can't change).

My hope is to create two groups and have some people in one group and some people in both groups. Files in each folder must stay in the appropriate group (IE if group 2 edits a file that belongs to group 1 and group 2 it should still stay in group 1 so that both group 1 and two can access it, but if it belongs to group 2 it should stay in group 2 so group 1 can't see it.

Here is the current setup:

[group1]
comment = group1
path = /data/group1
browseable = yes
public = yes
read only = no
valid users =@group1
write list =@group1
inherit permissions = yes
force group = group1
directory mask = 0770
create mask = 0770
oplocks = no
level2 oplocks = no

What I need is something along these lines that doesn't interfere with the above:

[group2]
comment = group2
path = /data/group1/group2
browseable = yes
public = yes
read only = no
valid users =@group2,@group1
write list =@group2,@group1
inherit permissions = no
force group = group2
directory mask = 0770
create mask = 0770
oplocks = no
level2 oplocks = no


Can this be done? Right now group 2 can't connect to the group2 share but group 1 can. I am guessing I have a permissions problem, but I'm not sure where. Any help would be greatly appreciated!