HDFS access denied error



0
Hi , I am trying to create a directory in hdfs and getting the below error
[cloudera@localhost wordcount]$ hadoop fs -mkdir /wordcount
mkdir: Permission denied: user=cloudera, access=WRITE, inode="/":hdfs:supergroup:drwxr-xr-x

Any help is appreciated.

3 Answer(s)


0

use command with sudo option
sudo -u hdfs hadoop fs -mkdir /wordcount

0

Did you trying changing the permissions of the folder via chmod?
give chmod 777

0

hi Sugandha and Others,

Do not start using the "chmod 777" without understanding the error here. In genera,l, using "chmod 777" is dangerous :)

The problem is with your command that you are executing. You are trying the create "wordcount" under root ("/"). That is the whole problem

The proper command is this
hadoop fs -mkdir /user/cloudera/wordcount (/user/cloudera/ is the hdfs location)

Thanks

Your Answer

Click on this code-snippet-icon icon to add code snippet.

Upload Files (Maximum image file size - 1.5 MB, other file size - 10 MB, total size - not more than 50 MB)

Email
Password