Reply
Explorer
Posts: 31
Registered: ‎09-24-2015

HDFS permission denied issue

I am getting below error when creating directory /user/testuser/data through API .

 

I have created shell user as testuser 

I have change owner of /user/testuser 

I can create the directory successfuly through shell command hdfs dfs -mkdir /user/testuser/data


But when I tried to create /user/testuser/data through mkdirs using API it failed with below error .

Error:

 

Java::OrgApacheHadoopSecurity::AccessControlException: Permission denied: user=testuser, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x

 

drwxrwxrwx - testuser testuser 0 2018-04-23 21:51 /user/testuser
drwxrwxrwx -testuser1 testuser1 0 2018-04-18 04:17 /user/testuser1

 

 

drwx------ - hbase hbase 0 2018-04-19 00:25 /hbase
drwxrwxrwt - hdfs supergroup 0 2017-08-10 11:18 /tmp
drwxrwxrwx - hdfs supergroup 0 2018-04-23 21:51 /user

 

 

Please let me know for any further information required to debug this issue .

 

Thanks,

Khirod

 

Expert Contributor
Posts: 125
Registered: ‎07-17-2017

Re: HDFS permission denied issue

Hi @Khirod

Please try to drop the directory and recreate it by the HDFS user:

sudo -u hdfs hdfs dfs -mkdir /user/testuser/data
Highlighted
Explorer
Posts: 31
Registered: ‎09-24-2015

Re: HDFS permission denied issue

Thanks, I got the cause of this issue . This is specifc to my code validation , there is no issue with cdh cluster . So closing this Issue .

 

Thanks 

Announcements