[cifs-protocol] Sharing /home with Samba/CIFS

Stefan (metze) Metzmacher metze at samba.org
Thu Oct 23 06:23:10 GMT 2008

Hi Tom,

the cifs-protocol mailing list is for technical discussions about
protocol details, please use samba at lists.samba.org for samba related
user questions.


> I would like to use Samba to share the /home directory from one machine
> to another.  So, I need the following to work:
> 1.  In the share, any file created by a user needs to be owned by that
> user.
> 2.  The system needs to obey the SGID bit for directories, which means:
>    a.  Any file created in a directory with SGID set, will inherit the
> directory's group ownership.
>    b.  Any directory created in said directory will inherit the group
> ownership, and also have its SGID bit set.
> On the server, I am running Samba 3.0.22 on a kernel.  On the
> client, running Linux 2.6.24, mount.cifs reports version 1.10-3.0.28a.
> I started by simply mounting the share using mount.cifs as root.  Unix
> extensions are turned on at the server, so I figured everything would
> "just work."  Unfortunately, it did not.
> The primary problem is that new files created by a user do inherit the
> group of SGID parent directories, but the owner is always set to root. 
> This is a slight problem.
> I tried setting the "setuids" option on the server, but this simply
> results in new files always having the user ID and group ID set to the
> owner, indiscriminately, completely ignoring the SGID bit of the parent
> directory.
> Can I get this to work somehow?
> P.S.  Yes, I tried NFS, which is what is normally used for this sort of
> thing, but unfortunately many of the users belong to more than 16
> groups, which breaks NFS3.  NFS4 supposedly solves this, but it doesn't
> work properly on the kernel that I am stuck with on the server.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/cifs-protocol/attachments/20081023/eb5bb2ab/signature.bin

More information about the cifs-protocol mailing list