title: How permission groups (by default) in hdfs work?? Why all users files belong to supergroup?
body: <p>I am absolutely confused about how permission groups in hdfs work, at least in my cluster. Let's say i have unix user kranach, that belongs to group bla. I have hadoop2 cluster setup from CDH5, there is unix group <em>hadoop</em> to which users hdfs, yarn and mapred belogns (but not kranach, he has nothing to do with hadoop).</p>
  
  <p>Now, my root directory in hdfs has permissions like following</p>
  
  <p><code>drwxr-xr-x   - hdfs supergroup          0 2015-01-27 23:08 /</code></p>
  
  <p>So, I am assuming that since me, kranach, does not belong to supergroup, i should not be allowed to create directories under /. However when i do this:
  <code>
  kranach@czarnobog:~$ hdfs dfs -mkdir /bla
  kranach@czarnobog:~$ hdfs dfs -ls  /
  Found 6 items
  drwxr-xr-x   - kranach supergroup          0 2015-01-27 23:27 /bla</code></p>
  
  <p>So I've just created directory, that belongs to me and group supergroup. But i am not in supergroup, and shouldn't be allowed to create dirs there in a first place! According to hadoop documentation (<a href="http://hadoop.apache.org/docs/r1.2.1/hdfs_permissions_guide.html#Configuration+Parameters" rel="nofollow">http://hadoop.apache.org/docs/r1.2.1/hdfs_permissions_guide.html#Configuration+Parameters</a>) by default hadoop just checks linux user "group" command, which clearly for mine user doesn't show supergroup (it doesn't even exist).</p>
  
  <p>Could anyone please explain me this behaviour? And tell how to prevent it (i.e. I want to have on this box users, that are allowed to access hdfs, but can't write there anything).</p>