Hadoop hdfs permission denied error when I try to make new directory

0 votes

I am trying to make a new directory in my hdfs using the following command:

hadoop fs -mkdir sample

I am getting this error:

mkdir: Permission denied: user=cloudera, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x

Nov 22, 2018 in Big Data Hadoop by slayer
• 29,350 points
14,750 views

1 answer to this question.

0 votes

This is because you dont have enough permission to create directory in hdfs. Try running this as sudo:

sudo -u hdfs hadoop fs -mkdir /sample

Alternatively if you want any user to be able to do this, you can change the permission property:

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

But this is not recommended because it compromises security.

answered Nov 22, 2018 by Omkar
• 69,210 points

Related Questions In Big Data Hadoop

+1 vote
1 answer
0 votes
1 answer
+1 vote
2 answers

What does hadoop fs -du command gives as output?

du command is used for to see ...READ MORE

answered Jul 24, 2019 in Big Data Hadoop by Lokesh Singh
5,441 views
0 votes
1 answer

How can I write text in HDFS using CMD?

Hadoop put & appendToFile only reads standard ...READ MORE

answered Apr 27, 2018 in Big Data Hadoop by Shubham
• 13,490 points
1,731 views
0 votes
1 answer

What is the command to find the free space in HDFS?

You can use dfsadmin which runs a ...READ MORE

answered Apr 29, 2018 in Big Data Hadoop by Shubham
• 13,490 points
1,847 views
0 votes
1 answer

How to find the used cache in HDFS

hdfs dfsadmin -report This command tells fs ...READ MORE

answered May 4, 2018 in Big Data Hadoop by Shubham
• 13,490 points
2,025 views
–1 vote
1 answer

Getting error when writing to HDFS. Unable to load native-hadoop library for your platform

Try this: sudo service hadoop-master restart After that try ...READ MORE

answered Dec 19, 2018 in Big Data Hadoop by Omkar
• 69,210 points
1,206 views
0 votes
1 answer

Hadoop: How to copy directory from local system to hdfs using Java code?

Just use the FileSystem's copyFromLocalFile method. If the source Path ...READ MORE

answered Nov 14, 2018 in Big Data Hadoop by Omkar
• 69,210 points
5,212 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP