On Fri, Oct 9, 2020 at 2:22 PM Roman Perepelitsa < roman.perepelitsa@gmail.com> wrote: > Perhaps something like this? > That would potentially cover it, except for one thing. Back to an earlier message: > > In neither variation are we checking that the existing directory actually has the requested mode. > > POSIX says this is how it should be. The document linked by Matthew asserts that "mkdir -m mode" should behave "as if" chmod() is called after creating the directory.