Skip to main content
Arf
Silver ⭐️⭐️
January 18, 2018
Solved

How to Fix HDFS Access Denied for User Root: Superuser Privilege Required

Hi,

when i run hdfs dfsadmin -report command. I get the Access denied for user root. Superuser privilege is required error. please help?

hdfs dfsadmin -report
Configured Capacity: 778288271867904 (707.85 TB)
Present Capacity: 776586815760931 (706.30 TB)
DFS Remaining: 282227055766051 (256.68 TB)
DFS Used: 494359759994880 (449.62 TB)
DFS Used%: 63.66%
Under replicated blocks: 0
Blocks with corrupt replicas: 0
Missing blocks: 0
Missing blocks (with replication factor 1): 0

-------------------------------------------------
report: Access denied for user root. Superuser privilege is required

geko
gekoAnswer
Platinum ⭐️
January 18, 2018

Hi,

that indicates your os user "root" is not the superuser of HDFS (root is just the "superuser" of the operating system).

Try to do the same as user "hdfs" (which is by default the hdfs superuser), as root do:

 

su - hdfs
hdfs dfsadmin -report

Basically, the HDFS superuser is the user, under which account the Namenode is started.

 

Alternatively you can add the os-user "root" to the group which is set as hdfs supergroup. Check for property

dfs.permissions.supergroup

and add "root" to this group (which points to an os group)

 

HTH, Gerd

4 replies

drkumar
Silver ⭐️⭐️
January 18, 2018
Try to remove the hdfs in the superuser group and check
Translate
Arf
ArfAuthor
Silver ⭐️⭐️
January 18, 2018

how to go to superuser group ?

Translate
geko
gekoAnswer
Platinum ⭐️
January 18, 2018

Hi,

that indicates your os user "root" is not the superuser of HDFS (root is just the "superuser" of the operating system).

Try to do the same as user "hdfs" (which is by default the hdfs superuser), as root do:

 

su - hdfs
hdfs dfsadmin -report

Basically, the HDFS superuser is the user, under which account the Namenode is started.

 

Alternatively you can add the os-user "root" to the group which is set as hdfs supergroup. Check for property

dfs.permissions.supergroup

and add "root" to this group (which points to an os group)

 

HTH, Gerd

Translate
Arf
ArfAuthor
Silver ⭐️⭐️
January 18, 2018

Thanks, issue has been resolved.

Translate