[Top][All Lists]

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

Re: mkdir -pm bug?

From: Pádraig Brady
Subject: Re: mkdir -pm bug?
Date: Fri, 27 Apr 2012 14:09:21 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

On 04/27/2012 12:52 PM, Henrikki Almusa wrote:
> Hi,
> I have a situation where I want to create with a script a directory path 
> based on input. The mkdir -p allows this nicely. However since I want to 
> enforce certain permissions on it I thought that I can use mkdir -pm<mode> to 
> create this. However it seems that when using both options, the parent 
> directories created won't get the --mode given, but instead use the default 
> mask. Is this intentional as I would think it as bug?
> $ mkdir -pm0700 baz/bar
> $ ls -lhd baz/ baz/bar
> drwxrwxr-x 3 [user] [group] 4.0K 2012-04-27 14:47 baz/
> drwx------ 2 [user] [group] 4.0K 2012-04-27 14:47 baz/bar
> $ mkdir --version
> mkdir (GNU coreutils) 8.5
> Copyright (C) 2010 Free Software Foundation, Inc.

This was discussed previously:


reply via email to

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