how to add user in supergroup of hdfs in linux?
Solution 1
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.
- sudo addgroup testgroup
- Then create users as many you want. e.g adduser sandy
- Then add these users to testgroup
- Then edit hdfs-site.xml property and add this property dfs.permissions.superusergroup, value will be your group name
- Now you can create any number of folders in hdfs and then assign ownership as yourusername:supergroup e.g sandy:testgroup
Solution 2
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}
Related videos on Youtube
sandip divekar
I am Devops Engineer working in Persistent systems pune,India. I am currently working on Hadoop , Cloudera , PIG and Tools related to hadoop. I am also working on Automation tools (Chef , Puppet, Jenkins) and others tools related to Devops.
Updated on November 06, 2020Comments
-
sandip divekar over 3 years
I was working on hdfs then i found something that permissions checks are not performed for the super-user. If my linux user is sandy and i want add sandy 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 ?
-
sandip divekar almost 10 yearsis it feasible to add that user in supergroup or is it considering the user access policies of hadoop ?
-
Ramanan almost 10 yearsTo add user to super user group $ sudo adduser <username> sudo
-
Martin Serrano almost 7 yearsFYI, use
groupadd
on centos/rhel