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

From: Peter Johansson <[email-masked]>
Date: Mon, 17 Sep 2012 09:53:52 +1000

[CC coreutils this is 
http://lists.gnu.org/archive/html/bug-automake/2012-08/msg00001.html]

On 09/14/2012 07:29 PM, didi wrote:
>> You can already do this. You can, e.g., install packages with
>> >  
>> >  make install MKDIR_P="mkdir -p -m 700"
> Unfortunately this doesn't seem to work properly, as the parent directories
> still retain the permissions of the user.
>
> $ mkdir -p -m 755 foo/bar
>
> drwx------ foo/
> drwxr-xr-x bar/
>
>
>
>
Hi Didi,

That was unexpected and unfortunate IMVHO. I see the same behaviour on 
my local system, in other words,

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 or if there is room for 
improvement in coreutils here (CC:ed).

Thanks,
Peter