Bug 500195
Summary: | mkdir -p does not honour -m | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ralf Ertzinger <redhat-bugzilla> |
Component: | coreutils | Assignee: | Ondrej Vasik <ovasik> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | rawhide | CC: | kdudka, ovasik, twaugh |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2009-05-11 16:39:44 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
Ralf Ertzinger
2009-05-11 15:44:41 UTC
Thanks for report. According to POSIX (http://www.opengroup.org/onlinepubs/009695399/utilities/mkdir.html) that's exactly the way how mkdir should behave. POSIX states that with -p and -m option parent directory creation should behave like `mkdir -p -m $(umask -S),u+wx $(dirname dir) && mkdir [-m mode] dir` - and that's the way how it behaves now. If you think that my POSIX interpretation is wrong, feel free to discuss it here. Closing NOTABUG as the current behaviour does comply with POSIX requirements... I think your interpretation of the POSIX standard is correct, it is just not what I'd expect it to do. The info page actually mentiones this behaviour, but who reads info pages? In the case of coreutils are info pages quite useful - as manpages of coreutils commands are only help2man-ed --help outputs of commands. But you are right - many users do ignore info pages... Maybe --help/man page improvement could be suggested on bug-coreutils (upstream bugreport/discussion mailing list) - to state that only final directory is affected by -m mode. |