Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

HDFS Directory creation Permission denied

avatar
Explorer

I just installed Cloudera 5.8 Quickstart VM.

 

 

Now I am trying to create a directory under hdfs in /user folder.

 

 

I executed 

hdfs dfs -mkdir /user/dmishra

I am getting error as 

[cloudera@quickstart ~]$ hdfs dfs -mkdir /user/dmishra
mkdir: Cannot create directory /user/dmishra. Name node is in safe mode.

 

some time I get

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

Ho do I make all the service are good in Cloudera VM.

Also I ant to know how do  I insert an Image that is saved in my computer so that I could display the service

running in VM

 

5 REPLIES 5

avatar
Super Collaborator
I am getting error as 

[cloudera@quickstart ~]$ hdfs dfs -mkdir /user/dmishra
mkdir: Cannot create directory /user/dmishra. Name node is in safe mode.

When your namenode is in "safe mode" it means it is in "read only". You need to exit the safe mode before writing to HDFS.

If the namenode enter safe mode without you telling him, it also means you have an issue (disk space ?, configuratoin issue ? ...)

 

some time I get

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

That error is pretty straight forward.

It mean the user "cloudera" do not have "write" permission on the HDFS folder "/user". This works exactly like a linux box.

 

Also, it tells you that the folder "/user" is owned by the user "hdfs" and the group associated is "supergroup" with the following permission ( read write cross for the owner. read and cross for the group. read and cross for "others").

 

If you want to create a folder inside "/user" you need to be the owner with the current sets of permissions.

avatar
Explorer

 

    Thank you for your reply.

   When I am installing the cloudera VM, I think all the settings are already configured. I restarted the all of the service and Cloudera management service. Then I I think my cloudera vm got this error.

What is the command or what service I need to fix , so I can resolve my issue.

 

Thanks

 

avatar
Explorer

 

    Thank you for your reply.

   When I am installing the cloudera VM, I think all the settings are already configured. I restarted the all of the service and Cloudera management service. Then I I think my cloudera vm got this error.

What is the command or what service I need to fix , so I can resolve my issue.

 

Thanks

 

avatar
New Contributor

 export HADOOP_USER_NAME=hdfs
hdfs dfs -mkdir -p /user/hduser
this is the solution by friend !!

avatar
New Contributor

No it is not. You get the exact same error as before. Does anybody know how to actually fix this broken program?