Subject: Re: bug#34009: doc: mkdir: warn that --mode doesn't affect parents

From: Stefan Kangas <[email-masked]>
Date: Sun, 18 Sep 2022 10:29:48 -0400

Assaf Gordon <[email-masked]> writes:

> On 2019-01-07 8:36 a.m., 積丹尼 Dan Jacobson wrote:
>> do warn that --mode doesn't affect any parents created.
>> $ mkdir --mode 700 -p /tmp/g/h/i
>> $ find /tmp/g -ls
>>      55795      0 drwxr-xr-x   3 jidanni  jidanni        60 Jan  7 23:30 /tmp/g
>>      55796      0 drwxr-xr-x   3 jidanni  jidanni        60 Jan  7 23:30 /tmp/g/h
>>      55797      0 drwx------   2 jidanni  jidanni        40 Jan  7 23:30 /tmp/g/h/i
>> Also warn on (info "(coreutils) mkdir invocation") more directly. Thanks.
>
> The info manual does contain a short sentence about parents' modes:
>  "To set the file permission bits of any newly-created parent
>   directories to a value [...]"
>
> But this can be improved.
>
> Marking as wishlist. Patches are welcomed.

This was fixed below (in coreutils-9.0), so this can probably be closed:

commit 3e61d5dd315be3aa1982b66b4e137564c61c849f
Author: Paul Eggert <[email-masked]>
Date:   Tue Dec 15 11:52:19 2020 -0800

    doc: document mkdir -m -p better

    Chris Colohan wrote that the man page did not do enough to dispel
    a common misunderstanding that “contributed to one of the scariest
    outages Google has ever seen” (Bug#45258).
    * doc/coreutils.texi (mkdir invocation):
    * src/mkdir.c (usage): Document -m vs -p better.