0

Getting this problem while creating a directory in hadoop file system mkdir: Permission denied: user=ubuntu, access=WRITE, inode="/user/ubuntu":hdfs:supergroup:drwxr-xr-x

Mohit Singh
  • 5,977
  • 2
  • 24
  • 25

2 Answers2

2

This can be achieved in two ways :-

1) Run the command using hdfs user

sudo -u hdfs hdfs dfs -mkdir /user/ubuntu/

2) Change the ownership of the folders using the hdfs user so that you may not face problems while creating directories inside it or using it.

sudo -u hdfs hdfs dfs -chowm ubuntu:ubuntu /user/ubuntu/

Now user ubuntu will take the ownership of the ubuntu directory in Hadoop file system.

Vikas Kukreti
  • 319
  • 8
  • 16
1

You should create this as hduser and not ubuntu user. This should work:

sudo -u hdfs hadoop fs -mkdr $dir

Amar
  • 3,825
  • 1
  • 23
  • 26