0
votes

I want to execute the command as root:

bin/hadoop fs -mkdir data_wm

But I obtain:

mkdir: org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, inode="":georgiana:supergroup:rwxr-xr-x

I configured hadoop on pseudo distributed mode like this: http://hadoop.apache.org/docs/stable/single_node_setup.html#PseudoDistributed

I also tried to put this in hdfs-site.xml, but doesn't work.

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

Does anyone have any idea how to solve this.

2

2 Answers

1
votes

Permission issue because you gives full read write and execute permission to all user in group

for this issue try this command

hadoop datanode -start if it suggest rollback then execute -rollback command then it will give you a permission error

go to your dfs location.

change the permission of data folder

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

0
votes

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!