+++ 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.
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.
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.
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