How NFSv4 ACLs work

Contributors

A client using NFSv4 ACLs can set and view ACLs on files and directories on the system. When a new file or subdirectory is created in a directory that has an ACL, the new file or subdirectory inherits all ACL Entries (ACEs) in the ACL that have been tagged with the appropriate inheritance flags.

When a file or directory is created as the result of an NFSv4 request, the ACL on the resulting file or directory depends on whether the file creation request includes an ACL or only standard UNIX file access permissions, and whether the parent directory has an ACL:

  • If the request includes an ACL, that ACL is used.

  • If the request includes only standard UNIX file access permissions but the parent directory has an ACL, the ACEs in the parent directory’s ACL are inherited by the new file or directory as long as the ACEs have been tagged with the appropriate inheritance flags.

    Note

    A parent ACL is inherited even if -v4.0-acl is set to off.

  • If the request includes only standard UNIX file access permissions and the parent directory does not have an ACL, the client file mode is used to set standard UNIX file access permissions.

  • If the request includes only standard UNIX file access permissions and the parent directory has a non-inheritable ACL, the new object is created only with mode bits.

Note

If the -chown-mode parameter has been set to restricted with commands in the vserver nfs or vserver export-policy rule families, file ownership can be changed by the superuser only, even if the on-disk permissions set with NFSv4 ACLs allow a non-root user to change the file ownership. For more information, see the relevant man pages.