]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/ufs/ufs/README.acls
OpenSSL: update to 3.0.12
[FreeBSD/FreeBSD.git] / sys / ufs / ufs / README.acls
1
2   UFS Access Control Lists Copyright
3
4 The UFS Access Control Lists implementation is copyright Robert Watson,
5 and is made available under a Berkeley-style license.
6
7   About UFS Access Control Lists (ACLs)
8
9 Access control lists allow the association of fine-grained discretionary
10 access control information with files and directories, extending the
11 base UNIX permission model in a (mostly) compatible way.  This
12 implementation largely follows the POSIX.1e model, and relies on the
13 availability of extended attributes to store extended components of
14 the ACL, while maintaining the base permission information in the inode.
15
16   Using UFS Access Control Lists (ACLs)
17
18 Support for UFS access control lists may be enabled by adding:
19
20         options UFS_ACL
21
22 to your kernel configuration.  As ACLs rely on the availability of extended
23 attributes, your file systems must have support for extended attributes.
24 For UFS2, this is supported natively, so no further configuration is
25 necessary.  For UFS1, you must also enable the optional extended attributes
26 support documented in README.extattr.  A summary of the instructions
27 and ACL-specific information follows.
28
29 To enable support for ACLs on a file system, the 'acls' mount flag
30 must be set for the file system.  This may be set using the tunefs
31 '-a' flag:
32
33         tunefs -a enable /dev/md0a
34
35 Or by using the mount-time flag:
36
37         mount -o acls /dev/md0a /mnt
38
39 The flag may also be set in /etc/fstab.  Note that mounting a file
40 system previously configured for ACLs without ACL-support will result
41 in incorrect application of discretionary protections.  Likewise,
42 mounting an ACL-enabled file system without kernel support for ACLs
43 will result in incorrect application of discretionary protections.  If
44 the kernel is not configured for ACL support, a warning will be
45 printed by the kernel at mount-time.  For reliability purposes, it
46 is recommended that the superblock flag be used instead of the
47 mount-time flag, as this will avoid re-mount isses with the root file
48 system.  For reliability and performance reasons, the use of ACLs on
49 UFS1 is discouraged; UFS2 extended attributes provide a more reliable
50 storage mechanism for ACLs.
51
52 Currently, support for ACLs on UFS1 requires the use of UFS1 EAs, which may
53 be enabled by adding:
54
55         options UFS_EXTATTR
56
57 to your kernel configuration file and rebuilding.  Because of filesystem
58 mount atomicity requirements, it is also recommended that:
59
60         options UFS_EXTATTR_AUTOSTART
61
62 be added to the kernel so as to support the atomic enabling of the
63 required extended attributes with the filesystem mount operation.  To
64 enable ACLs, two extended attributes must be available in the
65 EXTATTR_NAMESPACE_SYSTEM namespace: "posix1e.acl_access", which holds
66 the access ACL, and "posix1e.acl_default" which holds the default ACL
67 for directories.  If you're using UFS1 Extended Attributes, the following
68 commands may be used to create the necessary EA backing files for
69 ACLs in the filesystem root of each filesystem.  In these examples,
70 the root filesystem is used; see README.extattr for more details.
71
72   mkdir -p /.attribute/system
73   cd /.attribute/system
74   extattrctl initattr -p / 388 posix1e.acl_access
75   extattrctl initattr -p / 388 posix1e.acl_default
76
77 On the next mount of the root filesystem, the attributes will be
78 automatically started, and ACLs will be enabled.