bug#34009: warn that mkdir --mode doesn't affect parents created

2019-01-11 Thread Assaf Gordon

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  jidanni60 Jan  7 23:30 /tmp/g
 55796  0 drwxr-xr-x   3 jidanni  jidanni60 Jan  7 23:30 
/tmp/g/h
 55797  0 drwx--   2 jidanni  jidanni40 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'






bug#34009: warn that mkdir --mode doesn't affect parents created

2019-01-07 Thread 積丹尼 Dan Jacobson
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  jidanni60 Jan  7 23:30 /tmp/g
55796  0 drwxr-xr-x   3 jidanni  jidanni60 Jan  7 23:30 /tmp/g/h
55797  0 drwx--   2 jidanni  jidanni40 Jan  7 23:30 
/tmp/g/h/i

Also warn on (info "(coreutils) mkdir invocation") more directly. Thanks.