Scenario: Permission denied error when trying to create an Apache Hive table in Azure HDInsight

This article describes troubleshooting steps and possible resolutions for issues when using Interactive Query components in Azure HDInsight clusters.

Issue

You'll see the following error when attempting to create a table:

java.sql.SQLException: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [hdiuser] does not have [ALL] privilege on [wasbs://data@xxxxx.blob.core.windows.net/path/table]

You'll see a similar error message if you run the following HDFS storage command:

hdfs dfs -mkdir wasbs://data@xxxxx.blob.core.windows.net/path/table

Cause

The ability to create a table in Apache Hive is decided by the permissions applied to the cluster’s storage account. If the cluster storage account permissions are incorrect, you won't be able to create tables. This error denotes that you could have the correct Ranger policies for table creation, and still see "Permission Denied" errors.

Resolution

This error is caused due to lack of sufficient permissions on the storage container being used. The user creating the Hive table needs read, write, and execute permissions against the container.

Next steps

If you didn't see your problem or are unable to solve your issue, visit one of the following channels for more support:

  • Get answers from Azure experts through Azure Community Support.

  • Connect with @AzureSupport - the official Microsoft Azure account for improving customer experience. Connecting the Azure community to the right resources: answers, support, and experts.

  • If you need more help, you can submit a support request from the Azure portal. Select Support from the menu bar or open the Help + support hub. For more detailed information, review How to create an Azure support request. Access to Subscription Management and billing support is included with your Microsoft Azure subscription, and Technical Support is provided through one of the Azure Support Plans.