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 20, 2018 in Big Data Hadoop by Neha
• 6,280 points
1,346 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 20, 2018 by Frankie
• 9,810 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,190 points
349 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
• 67,120 points
485 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 in Big Data Hadoop by Leena
15 views
0 votes
1 answer

How Impala is fast compared to Hive in terms of query response?

Impala provides faster response as it uses MPP(massively ...READ MORE

answered Mar 21, 2018 in Big Data Hadoop by nitinrawat895
• 10,110 points
232 views
0 votes
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
• 10,110 points
2,046 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
• 10,110 points
196 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
10,459 views
0 votes
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,240 points
764 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,810 points
101 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,810 points
368 views