sticky bit on directories created via net neighborhood

Giulio Orsero giulioo at pobox.com
Wed Jan 26 10:53:03 GMT 2000


On Wed, 26 Jan 2000 08:47:54 +1100, hai scritto:

>I've set "force directory mode = 1775" in smb.conf, but when
>I make directories in a share through network neighborhood, I
>end up with 0775, i.e. user has rwx, group rwx, others rx.
>The sticky bit is not getting set.
You need to use "directory mode" also.
Then, there's a problem in samba <= 2.0.6 regarding the sticky bit.
Jeremy Allison posted a patch that will be in 2-0-7:

--- source/lib/doscalls.c  Thu Apr  8 14:13:01 1999
+++ source/lib/doscalls.c      Tue Dec  7 19:08:41 1999
@@ -104,11 +104,17 @@
 
 /*******************************************************************
  Mkdir() that calls dos_to_unix.
+ Cope with UNIXes that don't allow high order mode bits on mkdir.
+ Patch from gcarter at lanier.com.
 ********************************************************************/
 
 int dos_mkdir(char *dname,mode_t mode)
 {
-  return(mkdir(dos_to_unix(dname,False),mode));
+  int ret = mkdir(dos_to_unix(dname,False),mode);
+  if(!ret)
+    return(dos_chmod(dname,mode));
+  else
+    return ret;
 }
 
 /*******************************************************************

-- 
giulioo at pobox.com


More information about the samba mailing list