Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9477AD848 for ; Fri, 8 Feb 2013 22:41:13 +0000 (UTC) Received: (qmail 91789 invoked by uid 500); 8 Feb 2013 22:41:13 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 91758 invoked by uid 500); 8 Feb 2013 22:41:13 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 91749 invoked by uid 99); 8 Feb 2013 22:41:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Feb 2013 22:41:13 +0000 Date: Fri, 8 Feb 2013 22:41:13 +0000 (UTC) From: "Colin Patrick McCabe (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-4485) HDFS-347: DN should chmod socket path a+w MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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