]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
* coreutils.texi (mkdir invocation): Say how to set the file
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 30 Jan 2007 21:54:34 +0000 (22:54 +0100)
committerJim Meyering <jim@meyering.net>
Tue, 30 Jan 2007 21:54:34 +0000 (22:54 +0100)
permission bits of a parent directory with mkdir -p.

doc/ChangeLog
doc/coreutils.texi

index 76542317d056bb4310d73aebc109b59da45045f6..0dd0f9ef03620651ac77d96afa14cafe9d3bd39b 100644 (file)
@@ -1,3 +1,8 @@
+2007-01-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * coreutils.texi (mkdir invocation): Say how to set the file
+       permission bits of a parent directory with mkdir -p.
+
 2007-01-29  Jim Meyering  <jim@meyering.net>
 
        Document new syntax: "chown +0:+287 file", "chgrp +99 file"
index 05bf7c60959952b585ca7cdb37756f786c82c5e0..033059a7f97e78ec7fb4d3897cd47ea386ec0c81 100644 (file)
@@ -8446,12 +8446,20 @@ overridden in this way.
 @opindex -p
 @opindex --parents
 @cindex parent directories, creating
-Make any missing parent directories for each argument.  The file permission
-bits of parent directories are set to the umask modified by @samp{u+wx}.
-@xref{Directory Setuid and Setgid}, for how the set-user-ID and
-set-group-ID bits of parent directories are inherited.
-Ignore arguments corresponding to existing directories, and do not
-change their file mode bits.
+Make any missing parent directories for each argument, setting their
+file permission bits to the umask modified by @samp{u+wx}.  Ignore
+existing parent directories, and do not change their file permission
+bits.
+
+To set the file permission bits of any newly-created parent
+directories to a value that includes @samp{u+wx}, you can set the
+umask before invoking @command{mkdir}.  For example, if the shell
+command @samp{(umask u=rwx,go=rx; mkdir -p P/Q)} creates the parent
+@file{P} it sets the parent's permission bits to @samp{u=rwx,go=rx}.
+To set a parent's special mode bits as well, you can invoke
+@command{chmod} after @command{mkdir}.  @xref{Directory Setuid and
+Setgid}, for how the set-user-ID and set-group-ID bits of
+newly-created parent directories are inherited.
 
 @item -v
 @item --verbose