Hortonworks Sandbox Forum

AuthorizationException: hcat with root user

  • #29835
    Rupert Bailey
    Participant

    It seems the system root user can’t read sandbox user created table schemas from command line hcat commands. Why is this? Do user tables need to be fully qualified somehow?

    For example, a table schema I created through the web interface nyse_stocks cannot be read by:
    [root@sandbox ~]# hcat -e ‘describe nyse_stocks;’
    WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files.
    Hive history file=/tmp/root/hive_job_log_root_201305190226_603099069.txt
    FAILED: AuthorizationException org.apache.hadoop.security.AccessControlException: action READ not permitted on path hdfs://sandbox:8020/apps/hive/warehouse/nyse_stocks for user root

    However a table I created on the command line as root, can be viewed by the sandbox user in the web interface:
    [root@sandbox ~]# hcat -e ‘create table mytable(a int);’
    WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files.
    Hive history file=/tmp/root/hive_job_log_root_201305190224_889288293.txt
    OK
    ->can now be seen in the web interface on the HCAT page.

to create new topics or reply. | New User Registration

  • Author
    Replies
  • #29836
    Rupert Bailey
    Participant

    Okay I can answer that one myself:
    su – sandbox
    will place you as the other user and then you can view the HCAT script of that file. Strange that root is not “god mode” anymore :(

    #29961
    tedr
    Moderator

    HI Rupert,

    The root user is God mode on the system level, not on the hadoop/hdfs level – the user that is the most godlike in hadoop/hdfs is ‘hdfs’.

    thanks,
    Ted.

You must be to reply to this topic. | Create Account

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.