The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/ufs/ufs/README.acls

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

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

Cache object: 560a06a2293b62441c5f9ffe5a1851fc


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.