[Samba] sgid bit set on ordinary files mounted via smbfs

Tom Van Deun tomvdeun at gmail.com
Mon Dec 22 18:36:59 GMT 2008


Hi Ed
I had a similar problem not long ago.

The sgid bit is inherited from parent directories. Unmount the share and
look at the properties of the mount point folder. If the sgid bit is on,
chmod it off. Then mount the share again (and perhaps manually remove the
sgid bit for the files since they have already been set in the past). New
files shouldn't have the sgid bit set.

That's how I solved the problem. If that doesn't help you then I'm sorry to
say I don't have any idea atm. When I think of something I'll let you and
the list know. In turn, let us know if my advice helped you solve the
problem.


Kind regards,

Tom

On Mon, Dec 22, 2008 at 2:06 PM, Ed Avis <eda at waniasset.com> wrote:

> Hi, I find that files (not directories) in an smbfs-mounted share always
> have the sgid bit set.  I've looked in the FAQ and HOWTO but didn't see
> anything.  I wonder if someone might suggest a way to fix it.
>
> The share is served from Windows 2003 SP2 and mounted on a Fedora 10 Linux
> machine (samba-client-3.2.5-0.23.fc10.i386) with this command line:
>
> mount //wcl-fp1/shared /mnt/shared -t cifs -o user=x -o password=y
>
> It works and from the Linux side files appear to be owned by user root and
> group root.  Directories appear from Linux to have permissions drwxrwxrwx+,
> which is okay for this setup, but plain files have -rwxrwSrwx+ with an
> unwanted sgid bit.
>
> I have tried mounting with -o nosuid -o nosgid, but that does not make a
> difference.
>
> What should I do to stop the suid or sgid bits appearing to be set on plain
> files?  I would prefer to keep the Windows side unchanged and alter some
> configuration on the client.
>
> Thanks,
>
> --
> Ed Avis <eda at waniasset.com>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/listinfo/samba
>


More information about the samba mailing list