7

Regarding Unix file permissions, which Macs use, why are Mac files in particular able to have multiple owners? For instance, you can view the "Get info" panel of a file, and under the Permissions section at the bottom, add another owner by clicking on the plus sign "+".

How does this work? I don't think vanilla Unix is able to do this?

6

You are right, vanilla Unix doesn't support this. But there is this thing called ACL (Access Control Lists) which allows for a much more granular definition of access rights than the usual user/group/world rights. From Wikipedia:

Most of the Unix and Unix-like operating systems (e.g. Linux, BSD, or Solaris) support POSIX.1e ACLs, based on an early POSIX draft that was abandoned. Many of them, for example AIX, FreeBSD, Mac OS X beginning with version 10.4 ("Tiger"), or Solaris with ZFS filesystem, support NFSv4 ACLs, which are part of the NFSv4 standard.

By default every file only has the user/group/world rights

enter image description here

pse@Fourecks:~/Downloads$ ls -le UML_Plakat_8_2012_Web-Download_V1.pdf 
-rw-r--r--@ 1 pse  staff  4914537 Jun 21 09:56 UML_Plakat_8_2012_Web-Download_V1.pdf

If you now add an additional owner

enter image description here

Finder automatically creates a corresponding ACL entry for this:

pse@Fourecks:~/Downloads$ ls -le UML_Plakat_8_2012_Web-Download_V1.pdf 
-rw-r--r--@ 1 pse  staff  4914537 Jun 21 09:56 UML_Plakat_8_2012_Web-Download_V1.pdf
 0: user:jonnyenglish allow read,readattr,readextattr,readsecurity

You can also modify ACL entries directly from Terminal by using chmod (which gives you significantly more details to manipulate than the Get Info dialog in Finder). For details it's probably best to run man chmod in Terminal and read the ACL MANIPULATION OPTIONS section.

  • 2
    Perfect, although I would just add that you will struggle to find a modern Unix implementation that doesn't support this, it is very much standard it's just that it's a ball ache to administer at a command line level, and most people never need to be aware of it. – stuffe Aug 8 '13 at 9:42
  • 2
    It's a pain to administer even with GUIs because you can shoot yourself in your foot quite fast. – nohillside Aug 8 '13 at 9:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .