[ 
https://issues.apache.org/jira/browse/HDFS-4485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Colin Patrick McCabe updated HDFS-4485:
---------------------------------------

    Attachment: HDFS-4485.001.patch

It seems that this is a Linux-ism: Linux won't allow processes to write to UNIX 
domain sockets unless they have "w" permission on the socket file; similarly 
with reads.  The BSDs don't honor these permissions.  We can just chmod(666), 
since the intention is to allow other processes to communicate with the socket, 
whether or not they are user hdfs.

I verified that this patch allowed me to access hdfs as a different user via 
short-circuit reads.

I also introduced a configuration key to control tcpReadsDisabledForTesting, 
which makes it easy to sanity check that you're actually getting short-circuit 
reads.
                
> HDFS-347: DN should chmod socket path a+w
> -----------------------------------------
>
>                 Key: HDFS-4485
>                 URL: https://issues.apache.org/jira/browse/HDFS-4485
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode
>            Reporter: Todd Lipcon
>            Assignee: Colin Patrick McCabe
>            Priority: Critical
>         Attachments: HDFS-4485.001.patch
>
>
> In cluster-testing HDFS-347, we found that in clusters where the MR job 
> doesn't run as the same user as HDFS, clients wouldn't use short circuit read 
> because of a 'permission denied' error connecting to the socket. It turns out 
> that, in order to connect to a socket, clients need write permissions on the 
> socket file.
> The DN should set these permissions automatically after it creates the socket.

--
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

Reply via email to