dos_mkdir(), was: 2.0.7: inherit permissions = yes breaks setting read-only on files

Helge Blischke H.Blischke at
Sun Aug 27 17:09:36 GMT 2000

Robert Dahlem wrote:
> Sorry, if I missed your point but I think you missed the point. :-)
> The problem we were originally talking about exists only when upper_dir
> already exists and is world- (or scott-) writable, for example when
> creating subdirectories in /tmp.
> For point (1) you are right only as long as ~joe is not writeable for
> scott, but that's not the critical point. World and/or group writeable
> directories are the point and this can be handled with the sticky
> directory bit. No need for any emulation as far as I can see it, but
> I'm always willing to learn. :-)
> Regards,
>         Robert

I think the original problem was the "broken mkdir", i.e. the fact that
most UNIXes ignore
the high order bit of the mode, so that the newly created dir is
accessible by others just
between the mkdir and the following chmod setting the sticky bit.
My proposal was to do the mkdir with a mode of 0 and then setting not
only the sticky bit but
the wanted permissions as well by the following chmod - nothing more and
nothing less.


PS: BTW, I tested it from a world-writeable directory (/var/tmp), and it
behaved as

H.Blischke at
H.Blischke at
H.Blischke at

More information about the samba-technical mailing list