Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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

avatar
Explorer

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

1 ACCEPTED SOLUTION

avatar
Guru

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

View solution in original post

4 REPLIES 4

avatar
Explorer
Try to remove the hdfs in the superuser group and check

avatar
Explorer

how to go to superuser group ?

avatar
Guru

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

avatar
Explorer

Thanks, issue has been resolved.