Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 08E3A1034D for ; Mon, 10 Jun 2013 11:07:58 +0000 (UTC) Received: (qmail 39806 invoked by uid 500); 10 Jun 2013 11:07:52 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 39500 invoked by uid 500); 10 Jun 2013 11:07:52 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 39490 invoked by uid 99); 10 Jun 2013 11:07:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jun 2013 11:07:51 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of a.gayakwad@gmail.com designates 209.85.128.176 as permitted sender) Received: from [209.85.128.176] (HELO mail-ve0-f176.google.com) (209.85.128.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jun 2013 11:07:45 +0000 Received: by mail-ve0-f176.google.com with SMTP id c13so4637009vea.35 for ; Mon, 10 Jun 2013 04:07:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=C3ZyQ9ru2j3GEKGPCNZS7hM5Xonm9lvNSazmWRnbrhM=; b=c13cQPnhJ5vevG+GznQ3xSQ2IiOTPFCTRiTAbuUmoj+MTDUZCTmPXRW1H7RJedqaR5 dzTM6axLN69HB6X2LXKOhhPUqVNIroFR0tjBT6n/bINRAkhjmp1mxOCTdzKEJeE8NqmO lSZyAeuthe7t4XWIUL+3wicpYLV8AWlYmNOqSRFLT3ndrtZko+efm1UraDBVkJK195zH /UrkSgx/luxt67L5PvY9qFA4RkOCOQWgQaty90NyV+ARXujkOHnyaompJJKK8X1bC0s9 ylltrK7kO0nMwz0OMXcPyGyu2xAUGIg082ZTFEdIrwBJKLD+gW3EeeHn7HjOLbRjDx51 OvBA== MIME-Version: 1.0 X-Received: by 10.52.156.65 with SMTP id wc1mr4525269vdb.10.1370862444399; Mon, 10 Jun 2013 04:07:24 -0700 (PDT) Received: by 10.52.113.69 with HTTP; Mon, 10 Jun 2013 04:07:24 -0700 (PDT) Date: Mon, 10 Jun 2013 16:37:24 +0530 Message-ID: Subject: hdfs -copyToLocal file permission From: Abhishek Gayakwad To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=bcaec53aecea09013904decac94d X-Virus-Checked: Checked by ClamAV on apache.org --bcaec53aecea09013904decac94d Content-Type: text/plain; charset=ISO-8859-1 Hi, While copying file from hdfs file permissions are getting changed, my assumption was that while copying permissions should be retained. Is this behavior correct ? [abhishek@int019 ~]$ hdfs dfs -ls drwxr-xr-x - abhishek abhishek 0 2013-06-06 10:14 in-dir1 [abhishek@int019 ~]$ hdfs dfs -ls in-dir1 Found 2 items -rw-r--r-- 3 abhishek abhishek 0 2013-06-06 10:10 in-dir1/_SUCCESS *-rw-r--r-- * 3 abhishek abhishek 5000000000 2013-06-06 10:10 in-dir1/part-00001 [abhishek@int019 ~]$ hdfs dfs -copyToLocal in-dir1/part-00001 [abhishek@int019 ~]$ ll total 4887604 *-rwxr-xr-x* 1 abhishek abhishek 5000000000 Jun 10 06:08 part-00001 [abhishek@int019 ~]$ umask 0002 f*s.permissions.umask-mode* is not set so I think it defaults to 0022 Thanks, Abhishek --bcaec53aecea09013904decac94d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

While copying file from hd= fs file permissions are getting changed, my assumption was that while copyi= ng permissions should be retained. Is this behavior correct ?


[abhishek@int019 ~]$ hdfs dfs -ls
drwxr-xr-x=A0=A0 - abhishek abhi= shek=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 2013-06-06 10:14 in-dir1

[abhishek= @int019 ~]$ hdfs dfs -ls in-dir1
Found 2 items
-rw-r--r--=A0=A0 3 abh= ishek abhishek=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 2013-06-06 10:10 in-dir1/_SUCCE= SS
-rw-r--r--=A0=A0 3 abhishe= k abhishek 5000000000 2013-06-06 10:10 in-dir1/part-00001

[abhishek@= int019 ~]$ hdfs dfs -copyToLocal in-dir1/part-00001
[abhishek@int019 ~]$= ll
total 4887604
-rwxr-xr-x 1 abhishek abhishek 5000000000 Jun 10 06:08 part-00001
[abhishek@int01= 9 ~]$ umask
0002

fs.permissions.umask-mode is not set so I= think it defaults to 0022

Thanks,
Abhishek


--bcaec53aecea09013904decac94d--