Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 610559

Summary: mkdir info page update
Product: Red Hat Enterprise Linux 5 Reporter: ritz <rkhadgar>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: low Docs Contact:
Priority: low    
Version: 5.6CC: azelinka, cevich, tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: coreutils-5.97-28.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 609262 Environment:
Last Closed: 2011-07-21 10:36: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 ritz 2010-07-02 09:57:38 UTC
+++ This bug was initially created as a clone of Bug #609262 +++

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.


--- Additional comment from cevich on 2010-06-30 09:55:09 EDT ---

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 1 RHEL Program Management 2011-01-11 20:14:51 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 2 RHEL Program Management 2011-01-11 22:23:20 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 7 errata-xmlrpc 2011-07-21 10:36: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-1074.html

Comment 8 errata-xmlrpc 2011-07-21 12:18:22 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-1074.html