GNU bug report logs - #34009
doc: mkdir: warn that --mode doesn't affect parents

Previous Next

Package: coreutils;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Mon, 7 Jan 2019 15:37:01 UTC

Severity: normal

Merged with 45258

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34009 in the body.
You can then email your comments to 34009 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#34009; Package coreutils. (Mon, 07 Jan 2019 15:37:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Mon, 07 Jan 2019 15:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-coreutils <at> gnu.org
Subject: warn that mkdir --mode doesn't affect parents created
Date: Mon, 07 Jan 2019 23:36:28 +0800
On man mkdir

       -m, --mode=MODE
              set file mode (as in chmod), not a=rwx - umask

       -p, --parents
              no error if existing, make parent directories as needed

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.




Information forwarded to bug-coreutils <at> gnu.org:
bug#34009; Package coreutils. (Fri, 11 Jan 2019 08:51:02 GMT) Full text and rfc822 format available.

Message #8 received at 34009 <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>,
 34009 <at> debbugs.gnu.org
Subject: Re: bug#34009: warn that mkdir --mode doesn't affect parents created
Date: Fri, 11 Jan 2019 01:49:50 -0700
severity 34009 wishlist
retitle 34009 doc: mkdir: warn that --mode doesn't affect parents
stop

Hello,

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.

regards,
 - assaf'





Severity set to 'wishlist' from 'normal' Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 11 Jan 2019 08:51:02 GMT) Full text and rfc822 format available.

Changed bug title to 'doc: mkdir: warn that --mode doesn't affect parents' from 'warn that mkdir --mode doesn't affect parents created' Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 11 Jan 2019 08:51:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-coreutils <at> gnu.org:
bug#34009; Package coreutils. (Sun, 18 Sep 2022 14:30:02 GMT) Full text and rfc822 format available.

Message #15 received at 34009 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Assaf Gordon <assafgordon <at> gmail.com>
Cc: 34009 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#34009: doc: mkdir: warn that --mode doesn't affect parents
Date: Sun, 18 Sep 2022 10:29:48 -0400
Assaf Gordon <assafgordon <at> gmail.com> 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 <eggert <at> cs.ucla.edu>
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.




Severity set to 'normal' from 'wishlist' Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Sun, 18 Sep 2022 18:48:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 34009 <at> debbugs.gnu.org and 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Sun, 18 Sep 2022 18:48:02 GMT) Full text and rfc822 format available.

Merged 34009 45258. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Sun, 18 Sep 2022 19:01:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Oct 2022 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 185 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.