[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mkdir -pm bug?
From: |
Henrikki Almusa |
Subject: |
mkdir -pm bug? |
Date: |
Fri, 27 Apr 2012 14:52:26 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
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.
Regards,
--
Henrikki Almusa
- mkdir -pm bug?,
Henrikki Almusa <=