Support Questions

Find answers, ask questions, and share your expertise

hdfs fsck command issue

avatar
Explorer

Hi 

 

When i run  hdfs fsck -list-corruptfileblocks it is saying super user privilege is required .I am logged in as root user .Any idea what could be the reason .

 

 hdfs fsck -list-corruptfileblocks

 

Access denied for user root. Superuser privilege is required
Fsck on path '/' FAILED
FSCK ended at Wed Mar 25 19:42:40 SGT 2015 in 0 milliseconds
Access denied for user root. Superuser privilege is required
Fsck on path '/' FAILED
FSCK ended at Wed Mar 25 19:42:40 SGT 2015 in 0 milliseconds
Access denied for user root. Superuser privilege is required
Fsck on path '/' FAILED
FSCK ended at Wed Mar 25 19:42:40 SGT 2015 in 1 milliseconds
Access denied for user root. Superuser privilege is required
Fsck on path '/' FAILED
FSCK ended at Wed Mar 25 19:42:40 SGT 2015 in 0 milliseconds
Access denied for user root. Superuser privilege is required
Fsck on path '/' FAILED
FSCK ended at Wed Mar 25 19:42:40 SGT 2015 in 0 milliseconds
Access denied for user root. Superuser privilege is required
Fsck on path '/' FAILED
FSCK ended at Wed Mar 25 19:42:40 SGT 2015 in 1 milliseconds
Access denied for user root. Superuser privilege is required
Fsck on path '/' FAILED

1 ACCEPTED SOLUTION

avatar
Mentor
The superuser for HDFS is 'hdfs' in CDH installations. Please run the
command as the 'hdfs' user instead.

View solution in original post

2 REPLIES 2

avatar
Mentor
The superuser for HDFS is 'hdfs' in CDH installations. Please run the
command as the 'hdfs' user instead.

avatar
Contributor

command  :

 

sudo -u hdfs hdfs  fsck -list-corruptfileblocks

 

For deleting corrupted files :

 

sudo -u hdfs hdfs  fsck / -delete

 

 

Thanks.