Not able to create dir in HDFS -Running Your First MapReduce Program-WordCount

I am trying to create /wordcount directory in Hadoop distributed File System on CDH4 Cloudera VM Instance. I am getting Permission denied error.
I tried to issue sudo su and issued #hadoop fs -mkdir /wordcount
I still get the same error
mkdir: Permission denied: user=root, access=WRITE, inode="/":hdfs:supergroup:drw-r-xr-x
so with user cloudera it is the same error. Please advise if I am doing anything wrong.

1 Answer(s)


hi Anand,

Please execute the command as give below, looks like there is a slash before the directory name in your example

hdfs dfs -mkdir wordcount.

This will be created in hdfs location under "/user/cloudera" , if you had executed the command as "cloudera" user.