Permissions questions

Discussion in 'macOS' started by Silas1066, Jun 4, 2010.

  1. Silas1066 macrumors regular

    Joined:
    Nov 1, 2009
    #1
    When setting folder or file permissions from the GUI (Get Info->Sharing and Permissions), does this alway modify ACL permissions?

    In other words, if I use the chmod command to set POSIX permissions to a folder, then go into the GUI and set permissions there, will the ACL permissions set in the GUI override the permissions assigned by chmod?
     
  2. MisterMe macrumors G4

    MisterMe

    Joined:
    Jul 17, 2002
    Location:
    USA
    #2
    They are the same permissions. Whichever permissions you set last will be the permissions of the folder.
     
  3. calderone macrumors 68040

    calderone

    Joined:
    Aug 28, 2009
    Location:
    Seattle
    #3
    Sort of.

    The default permissions that appear in Get Info for a folder are the POSIX permissions.

    However, any additional permission that is added will be classified as an ACL.

    To answer the OPs quesiton. When you are modify permission in Get Info or with chmod (without any +/-a options) you are modifying POSIX permissions.

    So the standard three permissions (owner, group, other) are indeed the same permissions. And as the poster above stated, whichever you set last will be the permissions for the file or folder.

    However, there are overriding rules for ACLs and POSIX. I have covered this elsewhere but basically:

    1. No ACLs? POSIX applies
    2. If there in an ACL, ACE (Access Control Entry) order applies.
    3. ACL evaluation: The first ACE is evaluated, if there is no entry that applies it moves on until it find one for the requested action, allow or deny.
    4. A POSIX deny does not override an ACE allow
    5. If there is no ACE that applies, POSIX rules

    Much of this is irrelevant in the Get Info, because only three ACE settings are available: Read only, Read & Write, and Write only (Drop Box). You can however set more advanced ACEs.

    On a side note, I have forgot about the Open Directory binding script Silas. When I write scripts I am always finding ways to improve them, and this one fell victim to that. It is basically done, but I want to move some of the redundant tasks into functions.

    Eventually, I will put it up on my site and shoot you a link.
     
  4. Silas1066 thread starter macrumors regular

    Joined:
    Nov 1, 2009
    #4
    Thanks Calderone!

    I was a little hazy about the permissions, but it all makes sense now.

    Passed my first Apple exam Friday! (10.6 support exam).
     

Share This Page