bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12130: Fwd: bug#12130: "sudo make install" applies umask to new dire


From: Eric Blake
Subject: bug#12130: Fwd: bug#12130: "sudo make install" applies umask to new directories
Date: Mon, 17 Sep 2012 06:44:00 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0

tag 12130 notabug
thanks

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:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/mkdir.html

-p
    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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]