How to add user in supergroup of hdfs in linux

0 votes
I was working on hdfs then i found something that permissions checks are not performed for the super-user. If my linux user is jino and i want add jino to group of super-user. So permissions denied will not occur, is it feasible to do that in hdfs configuration. And if there is no problem in assigning the user to supergroup then how to do it ?
Sep 21, 2018 in Big Data Hadoop by Neha
• 6,300 points
11,170 views

1 answer to this question.

0 votes

Yes , now i have whole idea how users and group should be created on any hdfs cluster. First of all i didn't find any group named supergroup in /etc/group.

So good practice is to create your own supergroup.

  1. sudo addgroup testgroup
  2. Then create users as many you want. e.g adduser jino
  3. Then add these users to testgroup
  4. Then edit hdfs-site.xml property and add this property dfs.permissions.superusergroup, value will be your group name
  5. Now you can create any number of folders in hdfs and then assign ownership as yourusername:supergroup e.g jino:testgroup

Its not a good pratice to run jobs as super-user. Be advised to create a new group and new account for hadoop/hdfs and then give required permissions as below

$ sudo addgroup hadoop
$ sudo adduser --ingroup hadoop hduser

$ sudo chown hduser:hadoop {directory path}
                      OR

You can also add the user to hadoop group.

$ sudo adduser --ingroup hadoop jino

I hope this helps :)

answered Sep 21, 2018 by Frankie
• 9,830 points

Related Questions In Big Data Hadoop

0 votes
1 answer

How to print the content of a file in console present in HDFS?

Yes, you can use hdfs dfs command ...READ MORE

answered Apr 19, 2018 in Big Data Hadoop by Shubham
• 13,490 points
5,831 views
0 votes
1 answer

How to check the size of a file in Hadoop HDFS?

You can use the  hadoop fs -ls command to ...READ MORE

answered Nov 21, 2018 in Big Data Hadoop by Omkar
• 69,220 points
13,528 views
0 votes
1 answer

How to set rep to particular user in hdfs?

HDFS does not allocate capacity separately based ...READ MORE

answered Jul 5, 2019 in Big Data Hadoop by Leena
699 views
0 votes
1 answer

How to view contents of file in hadoop hdfs?

Hi@akhtar, You can use the Hadoop filesystem command ...READ MORE

answered Oct 5, 2020 in Big Data Hadoop by MD
• 95,460 points
8,236 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
11,029 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,538 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,836 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,350 points
4,612 views
0 votes
1 answer

How to write a file in HDFS using Java Programming language?

Define the HADOOP_CONF_DIR environment variable to your Hadoop configuration ...READ MORE

answered Sep 28, 2018 in Big Data Hadoop by Frankie
• 9,830 points
2,859 views
0 votes
1 answer

How to get absolute path of files in a directory in Hadoop?

You can use HDFS API like the ...READ MORE

answered Dec 4, 2018 in Big Data Hadoop by Frankie
• 9,830 points
4,544 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP