[
https://issues.apache.org/jira/browse/HDFS-5117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13746950#comment-13746950
]
Colin Patrick McCabe commented on HDFS-5117:
--------------------------------------------
I did read the description. That's why I commented. Did you try what I
proposed?
{code}
cmccabe@keter:/h> groups cmccabe
cmccabe : users
cmccabe@keter:/h> groups otheruser
otheruser : users
cmccabe@keter:/h> hadoop fs -copyFromLocal /tmp/foo /foo
cmccabe@keter:/h> hadoop fs -cat /foo
foobar
cmccabe@keter:/h> hadoop fs -chmod 775 /foo
cmccabe@keter:/h> hadoop fs -chgrp users /foo
cmccabe@keter:/h> sudo -E -u otheruser hadoop fs -appendToFile /tmp/foo /foo
cmccabe@keter:/h> hadoop fs -cat /foo
foobar
foobar
{code}
It's perfectly possible to have multiple users able to write to a file in HDFS.
They just have to be in the same group, and writing to a file with mode g+w.
Now, we don't support multiple *simultaneous* writers, but that's not a
permissions issue.
> Allow the owner of an HDFS path to be a group
> ---------------------------------------------
>
> Key: HDFS-5117
> URL: https://issues.apache.org/jira/browse/HDFS-5117
> Project: Hadoop HDFS
> Issue Type: New Feature
> Components: hdfs-client
> Reporter: Ryan Hennig
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> At eBay, we have the need to associate some HDFS paths with a set of users
> with write access, a set of users with read-only access, and neither read or
> write to others.
> The current model of POSIX-style permissions is nearly sufficient for this,
> except for the need of multiple writers.
> One easy fix would be to allow the owner of a path to be a group, and then
> grant owner permissions to all members of that group. I have verified that
> HDP 1.3 allows you to set the owner of a path to a group without error, but
> the owner permissions of that group are not given to members of the group.
> I've created a relatively simple fix for this by modifying the "check" method
> in src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSPermissionChecker.java
> and I am working on related changes to unit tests etc now.
> - Ryan
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira