You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Deepesh Khandelwal (JIRA)" <ji...@apache.org> on 2017/11/14 04:27:00 UTC

[jira] [Created] (AMBARI-22435) Hive services sets incorrect permissions on the root of HDFS while setting up replication

Deepesh Khandelwal created AMBARI-22435:
-------------------------------------------

             Summary: Hive services sets incorrect permissions on the root of HDFS while setting up replication
                 Key: AMBARI-22435
                 URL: https://issues.apache.org/jira/browse/AMBARI-22435
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: 2.6.0
            Reporter: Deepesh Khandelwal
            Priority: Critical
             Fix For: trunk


While starting Hive metastore or HiveServer2 observed that the hdfs audit log had the following entries:
{noformat}
2017-11-14 01:48:03,682 INFO FSNamesystem.audit: allowed=true   ugi=hdfs (auth:SIMPLE)  ip=/172.27.70.128       cmd=getfileinfo src=/   dst=null        perm=null       proto=webhdfs
2017-11-14 01:48:03,745 INFO FSNamesystem.audit: allowed=true   ugi=hdfs (auth:SIMPLE)  ip=/172.27.70.128       cmd=setPermission       src=/   dst=null        perm=hdfs:hdfs:rwxrwxrwt        proto=webhdfs
2017-11-14 01:48:03,809 INFO FSNamesystem.audit: allowed=true   ugi=hdfs (auth:SIMPLE)  ip=/172.27.70.128       cmd=setOwner    src=/   dst=null        perm=hive:hadoop:rwxrwxrwt      proto=webhdfs
2017-11-14 01:48:04,126 INFO FSNamesystem.audit: allowed=true   ugi=hdfs (auth:SIMPLE)  ip=/172.27.70.128       cmd=getfileinfo src=/   dst=null        perm=null       proto=webhdfs
2017-11-14 01:48:04,189 INFO FSNamesystem.audit: allowed=true   ugi=hdfs (auth:SIMPLE)  ip=/172.27.70.128       cmd=setPermission       src=/   dst=null        perm=hive:hadoop:rwx------      proto=webhdfs
{noformat}
The consequence of this was that for any non-hdfs user you will see the following error running hadoop commands:
{noformat}
$ hadoop fs -ls /
ls: Permission denied: user=root, access=READ_EXECUTE, inode="/":hive:hadoop:drwx------
{noformat}
On debugging this was happening due to incomplete null/empty check on params hive_repl_cmrootdir and hive_repl_rootdir in ambari/blob/trunk/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/hive.py.




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)