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

Helge Blischke H.Blischke at srz-berlin.de
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.

Helge

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


-- 
H.Blischke at srz-berlin.de
H.Blischke at srz-berlin.com
H.Blischke at acm.org




More information about the samba-technical mailing list