GNU bug report logs -
#36503
bug in 'mkdir' (ver 8.26)
Previous Next
Reported by: Sergey.Koltsov <at> firstlinesoftware.com
Date: Thu, 4 Jul 2019 16:53:02 UTC
Severity: normal
Tags: notabug
Done: Bernhard Voelker <mail <at> bernhard-voelker.de>
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 36503 in the body.
You can then email your comments to 36503 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#36503
; Package
coreutils
.
(Thu, 04 Jul 2019 16:53:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Sergey.Koltsov <at> firstlinesoftware.com
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Thu, 04 Jul 2019 16:53:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello!
I found a mismatch in the behavior of the program with its description.
When starting with *--mode=0700* and *--parents*, the rights apply only
to the last created directory.
The manual does not describe the exact behavior when specifying options.
The catalog was created in:
* GNU bash, версия 4.4.12(1)-release (x86_64-pc-linux-gnu)
* /zsh 5.3.1 (x86_64-debian-linux-gnu)
/
Log output in attachment.
Version of the program mkdir 8.26
OS: Debian 9
--
Thank you,
I recommend to encrypt all messages.
My fingerprint: 1E7D 69F4 F20B CF7D 6C3E 4732 A149 3D77 9172 D69A
First Line Software <http://www.firstlinesoftware.com/>
Sergey Koltsov
Support engineer | *First Line Software* | St. Petersburg
O +7 812 336-5533 | M +7 981 113-9005 | Skype: alexandrovv666
Email <mailto:Sergey.Koltsov <at> firstlinesoftware.com> | Website
<http://www.firstlinesoftware.com/> | Facebook
<https://www.facebook.com/firstlinesoftwareinc> | Twitter
<https://twitter.com/firstlinesoft> | LinkedIn
<http://www.linkedin.com/company/875103>
Think results.
[Message part 2 (text/html, inline)]
[mkdir.out (text/plain, attachment)]
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#36503
; Package
coreutils
.
(Fri, 05 Jul 2019 14:21:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 36503 <at> debbugs.gnu.org (full text, mbox):
tag 36503 notabug
close 36503
stop
On 7/4/19 6:31 PM, Sergey Koltsov wrote:
> Hello!
> I found a mismatch in the behavior of the program with its description.
>
> When starting with *--mode=0700* and *--parents*, the rights apply only
> to the last created directory.
> The manual does not describe the exact behavior when specifying options.
Thanks for the bug report.
The detailed manual is not the man page:
$ mkdir --help | grep ^Full
Full documentation <https://www.gnu.org/software/coreutils/mkdir>
That texinfo manual shows:
‘-p’
‘--parents’
Make any missing parent directories for each argument, setting
their file permission bits to the umask modified by ‘u+wx’.
Ignore existing parent directories, and do not change their
file permission bits.
So I think mkdir is doing what it is supposed to do in your case, and
the documentation matches the behavior.
If you want to change the permissions of the intermediate directories,
then the manual also will help you:
To set the file permission bits of any newly-created parent directories
to a value that includes ‘u+wx’, you can set the umask before invoking mkdir.
For example, if the shell command ‘(umask u=rwx,go=rx; mkdir -p P/Q)’ creates
the parent P it sets the parent’s permission bits to ‘u=rwx,go=rx’.
To set a parent’s special mode bits as well, you can invoke chmod after
mkdir. [...]
For your case, this seems to be:
$ ( umask go-rwx && mkdir --mode=0700 --parents --verbose ~/a/b/c/{1..6}; )
mkdir: created directory '/home/berny/a'
mkdir: created directory '/home/berny/a/b'
mkdir: created directory '/home/berny/a/b/c'
mkdir: created directory '/home/berny/a/b/c/1'
mkdir: created directory '/home/berny/a/b/c/2'
mkdir: created directory '/home/berny/a/b/c/3'
mkdir: created directory '/home/berny/a/b/c/4'
mkdir: created directory '/home/berny/a/b/c/5'
mkdir: created directory '/home/berny/a/b/c/6'
$ find a -exec ls -logd '{}' +
drwx------ 3 4096 Jul 5 16:13 a
drwx------ 3 4096 Jul 5 16:13 a/b
drwx------ 8 4096 Jul 5 16:13 a/b/c
drwx------ 2 4096 Jul 5 16:13 a/b/c/1
drwx------ 2 4096 Jul 5 16:13 a/b/c/2
drwx------ 2 4096 Jul 5 16:13 a/b/c/3
drwx------ 2 4096 Jul 5 16:13 a/b/c/4
drwx------ 2 4096 Jul 5 16:13 a/b/c/5
drwx------ 2 4096 Jul 5 16:13 a/b/c/6
As such, I'm closing this ticket, but discussion can continue by
replying to this thread.
Have a nice day,
Berny
Added tag(s) notabug.
Request was from
Bernhard Voelker <mail <at> bernhard-voelker.de>
to
control <at> debbugs.gnu.org
.
(Fri, 05 Jul 2019 14:21:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
36503 <at> debbugs.gnu.org and Sergey.Koltsov <at> firstlinesoftware.com
Request was from
Bernhard Voelker <mail <at> bernhard-voelker.de>
to
control <at> debbugs.gnu.org
.
(Fri, 05 Jul 2019 14:21:04 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
.
(Sat, 03 Aug 2019 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 323 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.