bugGNU Core Utilities - Bugs: bug #19546, mkdir -p should use default ACL...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

bug #19546: mkdir -p should use default ACL for parent directories

Submitted by:  Matt McCutchen <hashproduct>
Submitted on:  Sat 07 Apr 2007 03:37:51 PM UTC  
Votes:  60  
 
Category: NoneSeverity: 1 - Wish
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Sun 14 Feb 2010 02:18:15 AM UTC, comment #3:

This could be considered one part of bug #28891.

For now, I've written a simple, hacky patch (attached) that makes "mkdir -p" unconditionally observe default ACLs for ancestor directories but does not change the behavior for the actual argument directory. This should be enough for "mkdir -p -m 755" to give usable permissions when installing software. Others might wish to use this patch until a complete solution is available.

(file #19699)

Matt McCutchen <hashproduct>
Sat 28 Nov 2009 03:42:29 AM UTC, comment #2:

I don't take that text in the standard literally. In the hypothetical "POSIX plus abandoned POSIX ACLs" standard that we're implementing, I feel certain it would have been changed to account for default ACLs.

I really doubt that a user who applies a default ACL to a directory would then rely on mkdir honoring the umask in preference to the default ACL. But if you're genuinely worried about breakage, I would be happy to have a new option, or preferably a new environment variable that I could set globally. This issue causes me pain every time I install software from source: since I use umask 0077, installs into a shared directory with an appropriate default ACL are unusable by others until I go and change the permissions manually.

Matt McCutchen <hashproduct>
Mon 09 Apr 2007 06:14:29 PM UTC, comment #1:

Sorry, but POSIX requires that "mkdir -p FOO/BAR" must create FOO as if by the following command:

mkdir -m $(umask -S),u+wx FOO

See:

http://www.opengroup.org/susv3/utilities/mkdir.html

It might make sense to add the behavior you desire, as a new option to mkdir, but I'd have some qualms about changing the existing, standard behavior, as people may be relying on it.

Paul Eggert <eggert>
Project Administrator
Sat 07 Apr 2007 03:37:51 PM UTC, original submission:

I would like mkdir -p to observe the default ACL in preference to the umask (as nearly all other programs do) when creating parent directories.

To reproduce, run this in an empty directory on a filesystem with ACLs enabled:
umask 0077
setfacl -dm u::rwx,g::rwx,o::rwx .
mkdir foo
mkdir -p bar/baz
ls -l

Actual result:
total 0
drwx------+ 3 matt matt 72 Apr 7 11:32 bar
drwxrwxrwx+ 2 matt matt 48 Apr 7 11:32 foo

Desired result:
total 0
drwxrwxrwx+ 3 matt matt 72 Apr 7 11:32 bar
drwxrwxrwx+ 2 matt matt 48 Apr 7 11:32 foo

Matt McCutchen <hashproduct>

 

Attached Files
file #19699:  coreutils-mkdir-p-defacl-hack.diff added by hashproduct (2kB - application/octet-stream - Hacky patch to observe default ACL for parent directories)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by chewi
  • -unavailable- added by mjo
  • -unavailable- added by hashproduct (Voted in favor of this item)
  • -unavailable- added by eggert (Posted a comment)
  • -unavailable- added by hashproduct (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 60 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 09 Sep 2014 11:18:59 AM UTCchewiCarbon-Copy-=>Added chewi
    Wed 08 Aug 2012 02:46:08 PM UTCmjoCarbon-Copy-=>Added mjo
    Sun 14 Feb 2010 02:18:15 AM UTChashproductAttached File-=>Added coreutils-mkdir-p-defacl-hack.diff, #19699
    Sat 28 Nov 2009 03:50:26 AM UTChashproductCarbon-Copy-=>Added hashproduct
    Mon 09 Apr 2007 06:14:29 PM UTCeggertSeverity3 - Normal=>1 - Wish

    Back to the top


    Powered by Savane 3.1-cleanup