Help Center/ MapReduce Service/ User Guide (Kuala Lumpur Region)/ Troubleshooting/ Using Presto/ During sql-standard-with-group Configuration, a Schema Fails to Be Created and the Error Message "Access Denied" Is Displayed
Updated on 2022-12-14 GMT+08:00

During sql-standard-with-group Configuration, a Schema Fails to Be Created and the Error Message "Access Denied" Is Displayed

Issue

A schema fails to be created during sql-standard-with-group configuration and the error message "Access Denied" is displayed.

Symptom

CREATE SCHEMA hive.sf2 WITH (location = 'obs://obs-zy1234/sf2');Query 20200224_031203_00002_g6gzy failed: Access Denied: Cannot create schema sf2

Cause Analysis

To create a schema in Presto, you must have the administrator permission of Hive.

Procedure

MRS Manager:

  • Method 1:
    1. Log in to MRS Manager and choose System > Manage User.
    2. Locate the row that contains the target user, and click Modify in the Operation column.
    3. Click Select and Add Role to assign the System_administrator permission to the user.
    4. Click OK.
  • Method 2:
    1. Log in to MRS Manager and choose System > Manage Role.
    2. Click Create Role and set the following parameters:
      • Enter a role name, for example, hive_admin.
      • Set Permission to Hive and select Hive Admin Privilege.
    3. Click OK to save the role.
    4. Choose System > Manage User.
    5. Locate the row that contains the target user, and click Modify in the Operation column.
    6. Click Select and Add Role to add the newly created hive_admin permission to the user.
    7. Click OK.

FusionInsight Manager:

  • Method 1:
    1. Log in to FusionInsight Manager and choose System > Permission > User.
    2. Locate the row that contains the target user, and click Modify in the Operation column.
    3. Click Add next to the role to assign the System_administrator permission to the user.
    4. Click OK.
  • Method 2:
    1. Log in to FusionInsight Manager and choose System > Permission > Role.
    2. Click Create Role and set the following parameters:
      • Enter a role name, for example, hive_admin.
      • To configure resource permissions, select Hive and Hive Admin Permissions.
    3. Click OK to save the role.
    4. Choose System > Permission > User.
    5. Locate the row that contains the target user, and click Modify in the Operation column.
    6. Click Add next to the role to add the hive_admin permission for the user.
    7. Click OK.