0

我想以root身份执行命令:

bin/hadoop fs -mkdir data_wm

但我得到:

mkdir: org.apache.hadoop.security.AccessControlException: 权限被拒绝: user=root, access=WRITE, inode="":georgiana:supergroup:rwxr-xr-x

我在伪分布式模式下配置了 hadoop,如下所示:http ://hadoop.apache.org/docs/stable/single_node_setup.html#PseudoDistributed

我也尝试将它放在 hdfs-site.xml 中,但不起作用。

 <property>
     <name>dfs.permissions</name>
     <value>false</value>
 </property>

有谁知道如何解决这个问题。

4

2 回答 2

1

权限问题,因为您向组中的所有用户授予完全读写和执行权限

对于这个问题,试试这个命令

hadoop datanode -start 如果它建议回滚然后执行 -rollback 命令然后它会给你一个权限错误

去你的dfs位置。

更改数据文件夹的权限

chmod 755

drwxr-xr-x 6 hduser hadoop 4096 Sep 13 18:49 data drwxrwxr-x 5 hduser hadoop 4096 Sep 13 18:49 name

于 2013-09-16T09:48:55.353 回答
0

You are making directory inside hdfs directory bin/hadoop fs -mkdir data_wm which means inside user georgiana i.e /user/georgiana/data_wm while you have logged in as root. You have not given write permission to other users as per the permission msg :

rwxr-xr-x

  • first 3 digit rwx : Owner of the file/directory have full permission .
  • next 3 digit r-x : Group level permission , which means every other user who is in this group .
  • next 3 digit r-x : Others apart from group .

change user to georgiana using su georgiana and give password but if you intended to mkdir inside the /user/georgiana using root user then give this directory the appropriate permissions.

hadoop fs -chmod 777 /user/georgiana/

which means full permission to users within same group and others users outside the group.

Cheers!

于 2016-09-13T10:13:35.840 回答