Re: Suggestion for mkdir (original) (raw)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
From: | Pádraig Brady |
---|---|
Subject: | Re: Suggestion for mkdir |
Date: | Thu, 21 Nov 2013 09:39:14 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 11/20/2013 09:51 PM, Renich Bon Ciric wrote:
Hello,
I'd like to suggest that:
mkdir -m 2771 -p /tmp/some/nonexistent/dir
sets 2751 to all created dirs; not just the last one.
Thank you and congratulations for the great work on coreutils!
This was previously discussed at: http://bugs.gnu.org/14249
So the control you have on the parent dir perms is a bit restricted (pardon the pun), and you can just clear bits (except for u=wx) with umask.
Wanting to setgid the whole hierarchy is valid, but mkdir couldn't do that without races anyway. You wouldn't really gain anything apart from convenience over doing:
mkdir -p /tmp/some chmod g+s /tmp/some mkdir -p /tmp/some/nonexistent/dir
The OS should without races propagate the setgid bit to new dirs below /tmp/some/
thanks, Pádraig.
p.s. there is a somewhat related discussion re perms of parent dirs and umask at: http://savannah.gnu.org/bugs/?19546
- Suggestion for mkdir, Renich Bon Ciric, 2013/11/20
- Re: Suggestion for mkdir, Eric Blake, 2013/11/20
* Re: Suggestion for mkdir, Bob Proulx, 2013/11/20
* Re: Suggestion for mkdir, Renich Bon Ciric, 2013/11/20 - Re: Suggestion for mkdir,Pádraig Brady <=
- Re: Suggestion for mkdir, Eric Blake, 2013/11/20
- Prev by Date:Re: Suggestion for mkdir
- Next by Date:[PATCH] maint: avoid perl warning in sc_check-AUTHORS
- Previous by thread:Re: Suggestion for mkdir
- Next by thread:[PATCH] maint: avoid perl warning in sc_check-AUTHORS
- Index(es):