how to add user in supergroup of hdfs in linux?

sandip divekar picture sandip divekar · Jun 12, 2014 · Viewed 42k times · Source

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 ?

Answer

sandip divekar picture sandip divekar · Nov 6, 2014

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 sandy
  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 sandy:testgroup