Reply
New Contributor
Posts: 7
Registered: ‎08-27-2015

Webhdfs error on write and setowner - dr.who is not allowed to impersonate root

Hi,

I am trying to add tags to files in hdfs, using the .navigator file. If I manually write the file and put it in hdfs with hadoop standard commands, it is created with the same owner as the related files (root), and everything works fines.

But if I write the .navigator files through the WRITE and APPEND webhdfs commands, it creates the files with a different owner (dr.who). When I try to use SETOWNER or doas to set "root" as the file owner, it gives me the following error:

 

"Failed to obtain user group information: org.apache.hadoop.security.authorize.AuthorizationException: User: dr.who is not allowed to impersonate root"

 

I have set in the Cluster-wide Advanced Configuration Snippet (Safety Valve) for core-site.xml this properties these properties, and restarted the cluster to redeploy configurations

 

<property>
      <name>hadoop.proxyuser.root.hosts</name>
      <value>*</value>
</property>
<property>
     <name>hadoop.proxyuser.root.groups</name>
     <value>*</value>
</property>
<property>
    <name>hadoop.proxyuser.dr.who.groups</name>
    <value>*</value>
</property>
<property>
    <name>hadoop.proxyuser.dr.who.hosts</name>
    <value>*</value>
</property>

 

but it still doesn't work.

Any ideas on how to set the correct owner to these files, or how to directly write these files with root owner with hdfs? I am using Cloudera 5.3.3.

 

Thank you

Elena

 

 

 

 

New Contributor
Posts: 4
Registered: ‎11-25-2016

Re: Webhdfs error on write and setowner - dr.who is not allowed to impersonate root

Hi,

if you want to avoid to write using "dr.who" owner, you can set the user on webhdfs request.

 

Try using this format

 

http://<namenode>:50070/webhdfs/v1/<destination on hdfs>?op=CREATE&user.name=<your user>

 

Otherwise if you want change the ower, you can use the option CHOWN of webHdfs, but you have to invoke the command with <your user> equal to the owner of the file.

 

Best regards

Announcements