table of Contents
First, the problem
Second, analysis
Three, two kinds of solutions
- The first scenario
- The second option
Fourth, show
First, the problem
Permission denied: user=dr.who, access=READ_EXECUTE, inode="/user":root:supergroup:drwx-wx-wx
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
- The first scenario
Directly modify / user directory permissions set, as follows:
hdfs dfs -chmod -R 755 /user
- 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
hive_struct file has been deleted