[Samba] Problems of groups accessing shared directory

Qonita niet at cs.ui.ac.id
Thu Oct 31 08:16:01 GMT 2002


I have problems with people having different groups who access a shared
directory via samba.
The requirements are:
1. There are people with group "group1" and group "group2" in /etc/passwd
2. 3 people from group "group1" and 2 people from group "group2" are allowed
to access a shared directory and have read/write access to that directory.

Our solutions are:
1. We made a special additional group called "special" to classify those
people, and add the entry in /etc/group like:

2. The name of the shared directory to be accessed via samba is "ourdir",
the entry in smb.conf is like:
comment = special group ourdir
create mask=0664
directory mask=775
force directory mode=0511

3. In the linux system, the directory /home/pub/ourdir is chown to root and
chgrp to "special". The permission is 775, so that anyone belong to the
"special" group has full control to the directory.
drwxrwxr-x     12 root    special    4096  Oct 29 17:15  ourdir

Problems came when person1 put/edit a file via samba (Windows Explorer), the
ownership of the file is person1.group1, instead of person1.special. In this
case, person4.group2 cannot edit the file (doesn't belong to the same
How to make all files written or edited always belonging to group "special"?
I have tried "force group = special" but it turned out anyone has access to
the directory, eventhough they're not listed as member of group "special" in

Thank you very much for any replies.

-Qonita MS

More information about the samba mailing list