Permission Denied error while creating database in hive

后端 未结 2 1158
小鲜肉
小鲜肉 2021-01-14 05:34

I am trying to database in hive, but when I run below query in HIVE:

CREATE DATABASE BIGDATA;

I receive the following error message:

<
相关标签:
2条回答
  • 2021-01-14 06:35

    This is because of the lack of permission to the user aseema in hdfs. Follow the steps below.

    Login as hduser and perform the following operations (from the logs, it seems hduser is a superuser)

    hadoop fs -mkdir -p /user/hive/warehouse
    hadoop fs -mkdir /tmp
    hadoop fs -chmod -R 777 /user/hive
    hadoop fs -chmod 777 /tmp
    

    After this, try executing the create database statement from aseema user.

    0 讨论(0)
  • 2021-01-14 06:38

    If you are running from Local Mode then you should run this command from hdfs user:

    su hdfs
    

    Then change the permission like below if you want:

    hdfs dfs -chown -R <username_of_new_owner> /user
    
    0 讨论(0)
提交回复
热议问题