Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 609262

Summary: mkdir info page update
Product: Red Hat Enterprise Linux 6 Reporter: Chris Evich <cevich>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: azelinka, mhusnain, tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: coreutils-8.4-10.el6 Doc Type: Bug Fix
Doc Text:
Previously, the coreutils information page was not sufficiently clear about behaviour when multiple parent and leaf node directories are created. This is now fixed to incorporate additional information in the coreutils information page about the @option mode and its behaviour when combined with the --parents option.
Story Points: ---
Clone Of:
: 610559 (view as bug list) Environment:
Last Closed: 2011-05-19 13:50:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chris Evich 2010-06-29 19:21:34 UTC
Description of problem:
The man page for the mkdir command is not very clear about what permissions apply when creating parent directories as opposed to leaf-node directories.  The info page is slightly more verbose but still doesn't spell the behavior out clearly enough (assuming no familiarity).

How reproducible:
Easy

Steps to Reproduce:
1. info mkdir
2. man mkdir
3. (umask 072; mkdir -p -m 775 /tmp/foo/bar /tmp/foo/bar/baz)
4. ls -lad /tmp/foo /tmp/foo/bar /tmp/foo/bar/baz
  
Actual results:
Confusion as to why parent directories aren't also created with 777.  Confusion as to what applies when creating parent directories.

Expected results:
man page and info page content should both be explicit and clear regarding behavior when multiple parent and leaf-node directories are created.

Additional info:
The -m option ONLY affects the leaf-node directories listed on command line, NOT parent directories possibly created because of -p.  For parent (-p) created directories, it uses "umask modified by 'u+wx'".  Ideally -m would apply to both (seems intuitive), but failing that at least the man/info pages could be clearer.

Comment 1 RHEL Program Management 2010-06-29 19:43:10 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 2 Ondrej Vasik 2010-06-29 20:29:11 UTC
Thanks for suggestion - however - making manpage more verbose is probably NO-GO ... manpages from coreutils are very compact, made from --help output by help2man perl script. They mention info documentation as the source for more detailed information. So maybe just info documentation could be extended and more clear text could be added there. If you have some specific wording what should be added to info documentation, feel free to propose it. Thanks in advance...

Comment 3 Chris Evich 2010-06-30 13:55:09 UTC
Yeah, adding note to info page is probably fine.  Could just be something simple like:

Note: The --mode,-m option only applies to the right-most directories listed on the command line.  When combined with --parents, -p option, any parent directories are created with u+wx modified by umask.

Comment 11 Misha H. Ali 2011-05-10 04:23:08 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, the coreutils information page was not sufficiently clear about behaviour when multiple parent and leaf node directories are created. This is now fixed to incorporate additional information in the coreutils information page about the @option mode and its behaviour when combined with the --parents option.

Comment 12 errata-xmlrpc 2011-05-19 13:50:43 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0646.html