Reply
Highlighted
Contributor
Posts: 48
Registered: ‎05-30-2015
Accepted Solution

cannot create user directory after kerberos

[ Edited ]

Hi there,

 

I just enable Kerberos on my test cluster, however after enabling kerberos, I am not able to create /user/test directory anymore due to permission error.

 


hadoop fs -mkdir /user/test
mkdir: Permission denied: user=admin, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x

 

Anyway to fix it?

 

Thanks

Posts: 504
Topics: 14
Kudos: 84
Solutions: 45
Registered: ‎09-02-2016

Re: cannot create user directory after kerberos

@yongie

 

switch to hdfs user and try again

Posts: 866
Topics: 1
Kudos: 200
Solutions: 107
Registered: ‎04-22-2014

Re: cannot create user directory after kerberos

@yongie,

 

The Permission Denied message indicates that your hadoop command is authenticating as the user "admin".  As you can see, the user "admin" does not have previlige to write to the /user directory.

 

In order to be able to have non-hdfs user write to that /user directory with the permissions as they are, that "admin" user will need to be a superuser.

 

If you are not interested in having outher users as superusers, then the other option is to kinit as hdfs

Basically, you need to create a user in your KDC with the name "hdfs" and with the userprincipalname hdfs@realm.

 

See this page for details all that I mentioned above:

 

https://www.cloudera.com/documentation/enterprise/latest/topics/cm_sg_s5_hdfs_principal.html

 

Ben

Contributor
Posts: 48
Registered: ‎05-30-2015

Re: cannot create user directory after kerberos

@bgooley

 

It does the trick by creating hdfs user in kerberos, however, for the proper setup do I need to change the supergroup? and assign user to supergroup?

 

 

Announcements