code: private void checkOwner(LockedInodePath inodePath)
        throws AccessControlException, InvalidPathException {
      // collects inodes info on the path
      List<InodeView> inodeList = inodePath.getInodeViewList();
  
      // collects user and groups
      String user = AuthenticatedClientUser.getClientUser(ServerConfiguration.global());
      List<String> groups = getGroups(user);
  
      if (isPrivilegedUser(user, groups)) {
        return;
      }
  
      checkInodeList(user, groups, null, inodePath.getUri().getPath(), inodeList, true);
    }
docs: Checks whether the client user is the owner of the path.
  
  @param inodePath path to be checked on
  @throws AccessControlException if permission checking fails
  @throws InvalidPathException if the path is invalid