chmod: changing permissions of ‘/user/hive/warehouse‘: Permission denied. user=hdfs is not the owner
2020-08-06 15:44
363 查看
安装hive后发现无法创建表和写入
在执行Hadoop的创建目录、写数据等情况,可能会出现该异常,而在读文件的时候却不会报错,这主要是由于系统的用户名不同导致的,由于我们进行实际开发的时候都是用Windows操作系统,而编译后的JAVA程序是部署在Linux上的。而Windows的用户名一般都是自定义的或者是administrator,Linux的用户名是root,对于Hadoop的部署,也有可能是hadoop用户名。
由于,Hadoop的权限验证是依靠Linux系统的,而用户名不一致,会报错,这个错误很经典,异常名是
解决办法
<property> <name>dfs.permissions.enabled</name> <value>true</value> <description> If "true", enable permission checking in HDFS. If "false", permission checking is turned off, but all other behavior is unchanged. Switching from one parameter value to the other does not change the mode, owner or group of files or directories. </description> </property>
将这里面的value改为false,写到hdfs-site.xml中即可.
然后,重启namenode:
hadoop-daemon.sh stop namenode hadoop-daemon.sh start namenode
然后直接就ok了 重启hive 直接创建表ok
hive> create table t1(id string); OK Time taken: 4.583 seconds hive> show tables; OK t1 Time taken: 0.111 seconds, Fetched: 1 row(s) hive>
相关文章推荐
- org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create directory /user/hive/warehouse/page_view. Name node is in safe mode
- MetaException(message:file:/user/hive/warehouse/xxxx is not a directory or unable to create one)
- Hive:org.apache.hadoop.hdfs.protocol.NSQuotaExceededException: The NameSpace quota (directories and files) of directory /mydir is exceeded: quota=100000 file count=100001
- Hive hdfs Exception:Name node is in safe mode.及Access denied for user root. Superuser privile问题解决方法
- The owner of /home/yuguiyang/.config/ibus/bus is not root!
- The problem of the user is not associated with a trusted sql server connection 混合登录选项设置的问题
- The problem of the user is not associated with a trusted sql server connection 混合登录选项设置的问题
- iOS 【错误:'Changing the delegate of a tab bar managed by a tab bar controller is not allowed.'】
- ORA-01765: specifying owner's name of the table is not allowed
- ORA-20446: The owner of the job is not registered ORA-06512: at "SYSMAN.MGMT
- 安装Webpack时报错 It is likely you do not have the permissions to access this file as the current user
- securecrt access denied specified user is not a member of telnetclients group
- 安装Babel时报错 It is likely you do not have the permissions to access this file as the current user
- HOW TO: Change the Owner of a User-Defined Data Type That Is in Use in SQL Server 2000
- Access Denied: Either the SOM service on the machine is not started or the user attempting this connection is not a member of th
- iOS开发中的错误整理,Changing the delegate of a tab bar managed by a tab bar controller is not allowed
- UserWarning: The installed version of numexpr 2.4 is not supported in pandas and will be not be used
- Hive加载HDFS文件权限失败:Permission denied by sticky bit: user=hive
- Version 1.3.1_01 of the JVM is not suitable for this product
- eclipse 报错Version 1.6.0_45 of the JVM is not suitable for this product. Version:1.7 or greater is required