[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#12130: Fwd: bug#12130: "sudo make install" applies umask to new
Re: bug#12130: Fwd: bug#12130: "sudo make install" applies umask to new directories
Mon, 17 Sep 2012 06:44:00 -0600
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0
tag 12130 notabug
On 09/16/2012 05:53 PM, Peter Johansson wrote:
> mkdir -p -m 700 /tmp/foo/bar
> creates bar with permissions 700 and bar with 776 (my umask). I wonder
> is that behaviour is mandated by some standard
Yes - POSIX requires this:
Create any missing intermediate pathname components.
For each dir operand that does not name an existing directory,
effects equivalent to those caused by the following command shall occur:
mkdir -p -m $(umask -S),u+wx $(dirname dir) &&
mkdir [-m mode] dir
where the -m mode option represents that option supplied to the
original invocation of mkdir, if any.
> or if there is room for
> improvement in coreutils here (CC:ed).
Since POSIX requires the existing behavior, there's unfortunately no
room for improvement, and I'm closing this as not a bug in coreutils.
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Description: OpenPGP digital signature