Hadoop 2.8.5 Permission denied: user=dr.who, access=READ_EXECUTE, inode="/user:root问题解决

table of Contents

First, the problem

Second, analysis

Three, two kinds of solutions

  1. The first scenario
  2. The second option

Fourth, show



First, the problem

Permission denied: user=dr.who, access=READ_EXECUTE, inode="/user":root:supergroup:drwx-wx-wx

Here Insert Picture Description

Second, analysis

       I look in the browser directory and delete directories and files, why is dr.who, dr.who actually in a static user name hadoop http access, so what did special meaning, you can see it in the core-default.xml configuration

hadoop.http.staticuser.user=dr.who

We can modify the core-site.xml, configured for the current user,

    <property>
        <name>hadoop.http.staticuser.user</name>
        <value>hadoop</value>
    </property>

In addition, by viewing the default configuration hdfs hdfs-default.xml found hdfs is enabled by default permission checks.

dfs.permissions.enabled=true #是否在HDFS中开启权限检查,默认为true

Three, two kinds of solutions

  1. The first scenario

Directly modify / user directory permissions set, as follows:

hdfs dfs -chmod -R 755 /user
  1. The second option

Hadoop increase follows the profile of the core-site.xml:

<!-- 当前用户全设置成root -->
<property>
<name>hadoop.http.staticuser.user</name>
<value>root</value>
</property>

<!-- 不开启权限检查 -->
<property>
<name>dfs.permissions.enabled</name>
<value>false</value>
</property>

Fourth, show

Here Insert Picture Descriptionhive_struct file has been deleted
Here Insert Picture Description

Published 423 original articles · won praise 359 · Views 1.24 million +

Guess you like

Origin blog.csdn.net/silentwolfyh/article/details/103947804