]> arthur.barton.de Git - netatalk.git/blob - doc/README.ACLs
* FIX: dbd: Adding a file with the CNID from it's adouble file did
[netatalk.git] / doc / README.ACLs
1
2                  ACLs - Konfiguration and Infos vor Developpers
3                  ==============================================
4
5 ACL support for AFP is implemented with NFSv4 ACLs. Few filesystems and fewer OSes support
6 these. At the time of implementation its only provided with ZFS on Solaris, Opensolaris and
7 derived distributions.
8
9   Configuration
10   -------------
11
12 In order to be able to support ACLs, the following things have to be configured:
13
14 1. ZFS Volumes
15 2. Authentication Domain
16 3. Netatalk Volumes
17
18   1. ZFS Volumes:
19
20      You MUST configure two ACL parameters for any volume you want to use with Netatalk:
21
22         aclinherit = passthrough
23         aclmode = passthrough
24
25      For an explanation of what these parameters mean and how to apply them see, your hosts
26      ZFS documentation (e.g. man zfs).
27
28   2. Authentication Domain
29
30      Your server and the clients must be part of a security association where identity data
31      is coming from a common source. ACLs in Darwin are based on UUIDs and so is the ACL
32      specification in AFP 3.2. Therefor your source of identity data has to provide an
33      attribute for every user and group where a UUID is stored as a ASCII string.
34
35      In other words:
36       - you need an Open Directory Server or an LDAP server where you store UUIDs in some
37         attribute
38       - your clients must be configured to use this server 
39       - your server should be configured to use this server via nsswitch and PAM. This
40         however is not a strict requirement: 
41         if you create duplicates of every LDAP/OD user and group with identic attributes
42         (name, uid, gid) in your local data store (/etc/[passwd|group]) things will work
43
44               *  as long as user/group names/ids in the filesystem are equal  *
45               *         to their counterparts in the LDAP/OD datastore        *
46
47       - configure Netatalk via afp_ldap.conf so that Netatalk is able to retrieve the UUID
48         for users and groups via LDAP search queries
49
50   3. Netatalk Volumes
51
52      Finally you can add "options:acls" to your volume defintions to add ACL support.
53      In case your volume basedir doesn't grant read permissions via mode (like: 0700 root:adm)
54      but only via ACLs, you MUST add the "nostat" option to the volume defintion.
55
56   Implemantation Notes
57   --------------------
58
59 Some implementation details that are buried in the code are worthwhile to be documented.
60
61 1. Darwin ACEs vs NFSv4 ACEs
62 2. .AppleDouble VFS integration
63
64   1. Darwin ACEs vs NFSv4 ACEs
65
66      Basically as far as implementing AFP support is concerned they're equivalent.
67      Subtleties arise at other places:
68
69      FPAccess
70
71         The AFP client frequently checks the (DARWIN_)ACE_DELETE_CHILD right. This is most
72         often not explicitly granted via an ACE. Therefor the client would get an no access
73         error. The client in turn then declares the object in question read only.
74         Thus we have to the check the mode for every directory and add ACE_DELETE_CHILD if
75         the requestor has write permissions.
76
77      FPGetFileDirParms
78
79         10.5 does not only use unix mode and FPAccess for permission check, but also OS 9
80         access bits from FPGetFileDirParms. Thus we have to adjust the Access Rights bitmap
81         user bits by including any ACL rigths.
82
83   2. .AppleDouble VFS integration
84
85      FPSetACL sets ACLs on files and dirs. Our implementation also sets the same ACL on the
86      .AppleDouble file for files and on the .AppleDouble dir itself for dirs.
87
88      Thereafter ACLs for created files is taken care of by ACLs own inheritance rules.
89
90      For dirs on the other hand whe have to make sure that any ACL the dir inherits is
91      copied verbatim to its .AppleDouble dir. 
92
93
94                                                                     January 2009, Frank Lahm