All Products
Search
Document Center

Cloud Parallel File Storage:NFSv4 ACL features

Last Updated:May 08, 2026

This topic describes the key features of NFSv4 ACLs: permission sequence, permission inheritance, sorting, merging, and migration.

Permission sequence

Permissions are evaluated in the order the Access Control Entries (ACEs) are listed in the NFSv4 ACL.

ACEs can be either Allow or Deny. A Deny ACE can be placed anywhere in the list. For example, if an NFSv4 ACL contains two ACEs, group:adminis:rwxc and group:adminis:r---, their order directly determines whether the user adminis2 has read permission. The order of ACEs is critical when you configure an NFSv4 ACL.

For example, if the permissions for the user adminis2 on the dir4 directory are as follows, the user has all permissions on the directory.

#NFSv4 ACL
#owner:root
#group:root
group:adminis2:rwxc:allow
 (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (-)DELETE    (X)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED

group:adminis2:r---:deny
 (X)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED

special:owner@:---c:allow
 (-)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (-)DELETE    (-)DELETE_CHILD (X)CHOWN        (-)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED

special:group@:----:allow
 (-)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED

special:everyone@:----:allow
 (-)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED

However, if the permissions for the user adminis2 on the dir4 directory are set in the following order, the user does not have read permission.

#NFSv4 ACL
#owner:root
#group:root
group:adminis2:r---:deny
 (X)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED

group:adminis2:rwxc:allow
 (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (-)DELETE    (X)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED

special:owner@:---c:allow
 (-)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (-)DELETE    (-)DELETE_CHILD (X)CHOWN        (-)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED

special:group@:----:allow
 (-)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED

special:everyone@:----:allow
 (-)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
                

ACE sorting and merging

When you add a new ACE for a user, it is not automatically merged with that user's existing ACEs.

For example, assume the players group has the following ACL on file. If you add a new ACE that grants write (W) permission to the players group, the two ACEs are not merged.

  • Existing ACE permissions

    #NFSv4 ACL
    #owner:root
    #group:root
    special:everyone@:----:allow:FileInherit:DirInherit
     (-)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED
     (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
    
    special:group@:----:allow:FileInherit:DirInherit
     (-)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED
     (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
    
    special:owner@:----:allow:FileInherit:DirInherit
     (-)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED
     (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
    
    group:adminis:rwxc:allow:FileInherit:DirInherit
     (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
     (-)DELETE    (X)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED
    
    group:players:r-x-:allow:FileInherit:DirInherit
     (X)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
     (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
  • New ACE permissions

    #NFSv4 ACL
    #owner:root
    #group:root
    group:players:rwx-:allow:Inherited
     (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
     (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
    
    special:everyone@:----:allow:FileInherit:DirInherit
     (-)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED
     (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
    
    special:group@:----:allow:FileInherit:DirInherit
     (-)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED
     (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
    
    special:owner@:----:allow:FileInherit:DirInherit
     (-)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED
     (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
    
    group:adminis:rwxc:allow:FileInherit:DirInherit
     (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
     (-)DELETE    (X)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED
    
    group:players:r-x-:allow:FileInherit:DirInherit
     (X)READ/LIST (-)WRITE/CREATE (-)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
     (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED

Verify that the new permission is effective.

  • Run the command

    sudo su player -c 'echo 456 >> file'
    sudo su player -c 'cat file'
  • Sample output

    123
    456

Permission inheritance

Assume the current permissions for the dir5 directory are: the owner has write permission, the group has read permission, and everyone else has no access.

  • Grant the user player inheritable read and write permissions.

    1. Configure read and write permissions for the user player and save the rules to a text file, such as acl2.txt.

      #NFSv4 ACL
      #owner:root
      #group:root
      user:player:rwx-:allow:DirInherit
       (X)READ/LIST (X)WRITE/CREATE (-)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED
       (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
      
      user:player:rwx-:allow:FileInherit
       (X)READ/LIST (X)WRITE/CREATE (-)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED
       (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
    2. Apply the rules from acl2.txt to the dir5 directory.

      mmputacl -i ~/acl2.txt dir5
  • Files or directories created in the dir5 directory automatically inherit the ACEs.

    1. Go to the dir5 directory.

      cd  dir5
    2. Create a file named file.

      touch file
    3. Confirm that file automatically inherits the ACE permissions from the dir5 directory.

      • Run the command

        mmgetacl file
      • Sample output

        #NFSv4 ACL
        #owner:root
        #group:root
        user:player:rwx-:allow:Inherited
         (X)READ/LIST (X)WRITE/CREATE (-)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED
         (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
    4. Create a subdirectory named subdir.

      mkdir subdir
    5. Confirm that subdir automatically inherits the ACE permissions from the dir5 directory.

      • Run the command

        mmgetacl subdir
      • Sample output

        #NFSv4 ACL
        #owner:root
        #group:root
        user:player:rwx-:allow:DirInherit:Inherited
         (X)READ/LIST (X)WRITE/CREATE (-)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED
         (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
        
        user:player:rwx-:allow:FileInherit:InheritOnly:Inherited
         (X)READ/LIST (X)WRITE/CREATE (-)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED
         (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
  • Files or directories that you create in the subdir directory also automatically inherit the ACEs.

    1. Create the subdir/subdir2 directory.

      mkdir subdir/subdir2
    2. Confirm that the subdir/subdir2 directory automatically inherits the ACEs from the subdir subdirectory.

      • Run the command

        mmgetacl subdir/subdir2
      • Sample output

        #NFSv4 ACL
        #owner:root
        #group:root
        user:player:rwx-:allow:DirInherit:Inherited
         (X)READ/LIST (X)WRITE/CREATE (-)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED
         (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
        
        user:player:rwx-:allow:FileInherit:InheritOnly:Inherited
         (X)READ/LIST (X)WRITE/CREATE (-)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED
         (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
    3. Create the subdir/file2 file.

      touch subdir/file2
    4. Confirm that the subdir/file2 file automatically inherits the ACEs from the subdir subdirectory.

      • Run the command

        mmgetacl subdir/file2
      • Sample output

        #NFSv4 ACL
        #owner:root
        #group:root
        user:player:rwx-:allow:Inherited
         (X)READ/LIST (X)WRITE/CREATE (-)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED
         (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED      

The InheritOnly flag indicates the ACE is not used for permission checks on the current directory but is inherited by its subdirectories and files.

Note
  • You must configure DirInherit and FileInherit in separate ACEs. Otherwise, the error message Combining FileInherit and DirInherit makes the mask ambiguous is returned.

  • When you use the inherit only flag, the ACE itself is not evaluated for access checks. You must grant read (r) and execute (x) permissions on the parent directory. Otherwise, the user player cannot access the subdirectory.

Export

NFSv4 ACLs cannot be exported by using extended attributes.

Migration

You can use tools such as cp to migrate NFSv4 ACLs.

Alibaba Cloud CPFS supports migrating NFSv4 ACLs with tools such as cp, tar, and rsync, as described in How to preserve NFSv4 ACLs via extended attributes when copying file.

In the following example, the command cp --preserve=xattr file2 file5 copies file2 to file5 along with its NFSv4 ACL.

Note

The rsync tool may fail to migrate NFSv4 ACLs if its version is earlier than 3.1.2.

  1. Migrate the NFSv4 ACL of file2 to file5.

    cp --preserve=xattr newsub/file2 newsub/file5
  2. View the NFSv4 ACL of file2.

    • Run the command

      mmgetacl newsub/file2
    • Sample output

      #NFSv4 ACL
      #owner:player
      #group:players
      user:player:rwx-:allow:Inherited
       (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED
       (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
  3. View the NFSv4 ACL of file5.

    • Run the command

      mmgetacl newsub/file5
    • Sample output

      #NFSv4 ACL
      #owner:root
      #group:root
      user:player:rwx-:allow:Inherited
       (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (-)SYNCHRONIZE (-)READ_ACL  (-)READ_ATTR  (-)READ_NAMED
       (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED

NFSv4 ACL and mode interoperability

NFSv4 ACLs and the traditional permission mode are interoperable. Modifying an NFSv4 ACL can change the mode bits, and vice versa.

For example, the current mode of file is 0666.

  • Mode permissions of file

    -rw-rw-rw- 1 root root 0 Jun  1 14:45 file
  • ACE permissions of file

    #NFSv4 ACL
    #owner:root
    #group:root
    special:owner@:rw-c:allow
     (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
     (-)DELETE    (-)DELETE_CHILD (X)CHOWN        (-)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED
    
    special:group@:rw--:allow
     (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
     (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
    
    special:everyone@:rw--:allow
     (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
     (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
  • Grant the owner execute permission by changing the mode. The corresponding ACE is also updated with execute permission.

    1. Grant the owner execute permission by changing the mode.

      chmod u+x file
    2. View the mode permissions of file.

      • Run the command

        ls -l file
      • Sample output

        -rwxrw-rw- 1 root root 0 Jun  1 14:45 file
    3. Confirm that execute permission is added to the ACE for the owner.

      • Run the command

        mmgetacl file
      • Sample output

        #NFSv4 ACL
        #owner:root
        #group:root
        special:owner@:rwxc:allow
         (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
         (-)DELETE    (-)DELETE_CHILD (X)CHOWN        (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED
        
        special:group@:rw--:allow
         (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
         (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
        
        special:everyone@:rw--:allow
         (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
         (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
  • Grant the group execute permission by changing the ACE. The corresponding mode is also updated with execute permission.

    1. Edit the ACL attributes of file to grant execute permission to the group.

      mmeditacl file
    2. After the output appears, enter yes to apply the permission changes.

    3. View the ACE permissions that the group has on file.

      • Run the command

        mmgetacl file
      • Sample output

        #NFSv4 ACL
        #owner:root
        #group:root
        special:owner@:rwxc:allow
         (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
         (-)DELETE    (-)DELETE_CHILD (X)CHOWN        (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED
        
        special:group@:rwx-:allow
         (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
         (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (X)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
        
        special:everyone@:rw--:allow
         (X)READ/LIST (X)WRITE/CREATE (X)APPEND/MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
         (-)DELETE    (-)DELETE_CHILD (-)CHOWN        (-)EXEC/SEARCH (-)WRITE_ACL (-)WRITE_ATTR (-)WRITE_NAMED
    4. Confirm that execute permission is added for the group in the mode.

      • Run the command

        ls -l file
      • Sample output

        -rwxrwxrw- 1 root root 0 Jun  1 14:45 file

Interoperability with POSIX ACLs

Interoperability with POSIX ACLs is not supported.