Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 84302 invoked from network); 24 Mar 2008 21:59:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Mar 2008 21:59:29 -0000 Received: (qmail 60388 invoked by uid 500); 24 Mar 2008 21:59:27 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 60352 invoked by uid 500); 24 Mar 2008 21:59:27 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 60343 invoked by uid 99); 24 Mar 2008 21:59:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Mar 2008 14:59:27 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Mar 2008 21:58:56 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 75E31234C0AE for ; Mon, 24 Mar 2008 14:57:24 -0700 (PDT) Message-ID: <1706410440.1206395844481.JavaMail.jira@brutus> Date: Mon, 24 Mar 2008 14:57:24 -0700 (PDT) From: "Allen Wittenauer (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Commented: (HADOOP-3081) The static method FileSystem.mkdirs() should use the correct permissions to create directory In-Reply-To: <927390388.1206380244468.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-3081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581691#action_12581691 ] Allen Wittenauer commented on HADOOP-3081: ------------------------------------------ Is there a reason you don't just jettison the static one and use mkdir() followed by a chmod() like UNIX? The static one will break setuid/setgid if/when it is supported. > The static method FileSystem.mkdirs() should use the correct permissions to create directory > -------------------------------------------------------------------------------------------- > > Key: HADOOP-3081 > URL: https://issues.apache.org/jira/browse/HADOOP-3081 > Project: Hadoop Core > Issue Type: Bug > Components: dfs > Affects Versions: 0.16.1 > Reporter: dhruba borthakur > > There is a static method FileSystem.mkdirs() that create the directory first and then sets permissions in it. Instead, it should create the directory with the correct permissions. > Otherwise, even if dfs.permission is set to off, one might see job submission failures with the following stack trace: > at org.apache.hadoop.dfs.PermissionChecker.check(PermissionChecker.java:173) > at > org.apache.hadoop.dfs.PermissionChecker.checkTraverse(PermissionChecker.java:129) > at > org.apache.hadoop.dfs.PermissionChecker.checkPermission(PermissionChecker.java:99) > at org.apache.hadoop.dfs.FSNamesystem.checkPermission(FSNamesystem.java:4031) > at org.apache.hadoop.dfs.FSNamesystem.checkOwner(FSNamesystem.java:3986) > at org.apache.hadoop.dfs.FSNamesystem.setPermission(FSNamesystem.java:715) > at org.apache.hadoop.dfs.NameNode.setPermission(NameNode.java:297) > at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:409) > at org.apache.hadoop.ipc.Server$Handler.run(Server.java:899) > at org.apache.hadoop.ipc.Client.call(Client.java:512) > at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:198) > at org.apache.hadoop.dfs.$Proxy4.setPermission(Unknown Source) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:82) > at > org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:59) > at org.apache.hadoop.dfs.$Proxy4.setPermission(Unknown Source) > at > org.apache.hadoop.dfs.DistributedFileSystem.setPermission(DistributedFileSystem.java:351) > at org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:218) > at org.apache.hadoop.mapred.JobTracker.(JobTracker.java:688) > at org.apache.hadoop.mapred.JobTracker.startTracker(JobTracker.java:124) > at org.apache.hadoop.mapred.JobTracker.main(JobTracker.java:2114) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.