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
Asked
Active
Viewed 1,037 times
0
-
You should create the directory as `hduser` not as `ubuntu` user. – Rajesh N May 04 '15 at 10:58
2 Answers
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
-
you may use hadoop fs -mkdir "name of the folder" for eg: hadoop fs -mkdir /user/training/folder – Mohit Singh May 03 '18 at 07:37
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