Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-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 4572611DD0 for ; Wed, 17 Sep 2014 02:44:50 +0000 (UTC) Received: (qmail 6101 invoked by uid 500); 17 Sep 2014 02:44:44 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 5986 invoked by uid 500); 17 Sep 2014 02:44:44 -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 5974 invoked by uid 99); 17 Sep 2014 02:44:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Sep 2014 02:44:44 +0000 X-ASF-Spam-Status: No, hits=3.0 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_REPLYTO_END_DIGIT,HTML_FONT_FACE_BAD,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_FILL_THIS_FORM_SHORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mislam77@yahoo.com designates 98.138.91.47 as permitted sender) Received: from [98.138.91.47] (HELO nm16-vm1.bullet.mail.ne1.yahoo.com) (98.138.91.47) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Sep 2014 02:44:38 +0000 Received: from [98.138.226.179] by nm16.bullet.mail.ne1.yahoo.com with NNFMP; 17 Sep 2014 02:44:17 -0000 Received: from [98.138.226.161] by tm14.bullet.mail.ne1.yahoo.com with NNFMP; 17 Sep 2014 02:44:17 -0000 Received: from [127.0.0.1] by omp1062.mail.ne1.yahoo.com with NNFMP; 17 Sep 2014 02:44:17 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 60159.8105.bm@omp1062.mail.ne1.yahoo.com Received: (qmail 98605 invoked by uid 60001); 17 Sep 2014 02:44:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1410921857; bh=nhWpxziCtGuuN4+iKbeKBjNgPP+TLi7K4fIZKqhJ1Xk=; h=References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=ehbTChZjXVbZkfRAnoz++cAVHvENdYzjR+STjroYVwrt7r+513CgPOp8baWXqMegsLawZWmmgvJaS8nXxzhDHcBRMtrzey4HPGDzhzZwxYI1hTm59GR7xnwJjBnv4ZiHXIk6/VYcdCSnZJDdmtbz2F0Ovlk8xtm/PdqFQqi1rDs= X-YMail-OSG: eJAnuQcVM1nDsv8eXOpcbqZSLed.ijmw5kaE0bYItPNe4Np G5wDwFOzWH3sBiKxUntkr5C7gEBiYwNfxe1Zab7UDhl61M8cY.Tc02QktQ_K EHv3CEXIWQ7BXTpVGDGPioSc2x__GKUUFI9jqL4vYSOf3yNJtXPlRH9bwBui mLip9Mm0CNS.nHam6wChKDJ6zTdeiV7TiWf99XlbTe5CgBAISgPSNkiyEeU3 7sd3mbMGKpTe514okf2hm5CPYxI.dY37jtAfxLIxa97RSRsU3pODsRHabdQY F2Mx9H3_UJwC6MBIzi9cZ3gLmi.X3TgfC0bF.3sB_bnnZAQkwqiwKgX5_sYZ _fc7ESuKwQxK.fd5dTdbuI_PGUCLAdA_P0SocviEQ9cu_zRkrjfjRIuloQT1 Q9amGJ1Ix7w7hN_Cp7n2jjHsOZgNoHVgFKlFzOkWVhycgSJVk2QKOpM2T4Ij _d.WCq7IlRULonjFrAHlgSdcgs4U5f6UIrm59Bd3.iLozbF0ofZ0fjA5ZS1A xuY4z0gwSBfBa1us41C_GiZ7OLFPShU6YTVNaBp0eOzHixYBjdRQlhPe1_y4 SN2tZYCaLZZW5vhu.pqKhcwWBgg3vaWGTufe_yvEABacUt1xY Received: from [69.28.149.129] by web121705.mail.ne1.yahoo.com via HTTP; Tue, 16 Sep 2014 19:44:16 PDT X-Rocket-MIMEInfo: 002.001,SGkgTmFnYSwKVGhhbmtzIGEgbG90IGZvciB5b3VyIGFuc3dlci4KSSB0aGluayBpdCB3aWxsIGRlZmluaXRlbHkgYW5zd2VyIHRoZSBwYXJ0IG9mIG15IHF1ZXN0aW9uLgpGb3IgZXhhbXBsZSwgZG8geW91IGtub3cgaWYgIG1rZGlycyB3b3JrcyB3aXRoIHBlcm1pc3Npb24_CgpSZWdhcmRzLApNb2hhbW1hZAoKCgpPbiBUdWVzZGF5LCBTZXB0ZW1iZXIgMTYsIDIwMTQgNjo0MCBQTSwgTmFnYW5hcmFzaW1oYSBHIFIgKE5hZ2EpIDxnYXJsYW5hZ2FuYXJhc2ltaGFAaHVhd2VpLmNvbT4gd3JvdGU6CiAKCgpIaSABMAEBAQE- X-Mailer: YahooMailWebService/0.8.203.696 References: <1410906125.54671.YahooMailNeo@web121704.mail.ne1.yahoo.com> Message-ID: <1410921856.11724.YahooMailNeo@web121705.mail.ne1.yahoo.com> Date: Tue, 16 Sep 2014 19:44:16 -0700 From: Mohammad Islam Reply-To: Mohammad Islam Subject: Re: Programatic way to recursively chmod a directory To: "user@hadoop.apache.org" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-1714046436-1040597217-1410921856=:11724" X-Virus-Checked: Checked by ClamAV on apache.org ---1714046436-1040597217-1410921856=:11724 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi Naga,=0AThanks a lot for your answer.=0AI think it will definitely answe= r the part of my question.=0AFor example, do you know if mkdirs works with= permission?=0A=0ARegards,=0AMohammad=0A=0A=0A=0AOn Tuesday, September 16, = 2014 6:40 PM, Naganarasimha G R (Naga) wrot= e:=0A =0A=0A=0AHi Mohammad, =0AIf the user you are trying with has rights o= n the folder then you can try umask of 000 (like 777 - 000 =3D777 effectiv= e rights ) =0Aor you can check what is effective umask setting which you w= ant to have, so that files created by this user by default has the desired = rights.=0A=0A=0ARegards,=0ANaga=0A =0AHuawei Technologies Co., Ltd.=0APhone= : =0AFax: =0AMobile: +91 9980040283 =0AEmail: naganarasimhagr@huawei.com= =0AHuawei Technologies Co., Ltd.=0ABantian, Longgang District,Shenzhen 5181= 29, P.R.China=0Ahttp://www.huawei.com =0A=A1This e-mail and its attachments= contain confidential information from HUAWEI, which is intended only for t= he person or entity whose address is listed above. Any use of the informati= on contained herein in any way (including, but not limited to, total or par= tial disclosure, reproduction, or dissemination) by persons other than the = intended recipient(s) is prohibited. If you receive this e-mail in error, p= lease notify the sender by phone or email immediately and delete it!=0A=0A_= _______________________________=0A =0AFrom: Mohammad Islam [mislam77@yahoo.= com]=0ASent: Wednesday, September 17, 2014 06:22=0ATo: user@hadoop.apache.o= rg=0ASubject: Programatic way to recursively chmod a directory=0A=0A=0AHi,= =0AIs there a *programatic* solution to do it recursively?=0AI'm using Hado= op 2.3.0.=0A=0AI tried the followings:=0A=0A1. I tried FileSystem.mkdirs( p= ath, permission), it created the directory but the permission is not set co= rrectly. =0A=0A2. I tried FileSystem.setPermisison(path, permission), it ch= anges only the current directory not recursively.=0A=0A3. I tried to use Fi= leUtil.chmod() with no luck,=0A=0A4. new FsShell(conf).run(new String[]{"-c= hmod" , "-R", "777", "/tmp/mislam"}); it worked but looks like it is not a = good solution to execute a shell.=0A=0A=0AQuestions :=0A1. Is there a solut= ion for this?=0A2. If not, is there any JIRA for this? I didn't find one.= =0A3. What next? =0A=0A=0ARegards,=0AMohammad ---1714046436-1040597217-1410921856=:11724 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Naga,
Thanks a lot for your answer.
I think it will definitely answer the part of my question.

For example, do you know if  mkdirs works wi= th permission?

Regards,
Mohammad


On Tuesday, September 16, 2014 6:40 PM, Naga= narasimha G R (Naga) <garlanaganarasimha@huawei.com> wrote:


=0A
Hi Mohammad,=0A
If the user you are trying with has rights on the folder the= n you can try umask of 000  (like 777 - 000 =3D777 effective rights ) =  
=0A
or you can check what is effective umask setting which you want to h= ave, so that files created by this user by default has the desired rights.<= /font>
=0A
=0A
=0A
=0A
=0A
=0A

=0A
=0A
Regards,
=0A
Naga
=0A
 
=0A=0A
Huawei Technologies Co., Ltd.
= =0APhone:
=0AFax:
=0AMobile:  +9= 1 9980040283
=0AEmail: naganarasimhagr@huawei.com=
=0AHuawei Technologies Co., Ltd.
= =0ABantian, Longgang District,Shenzhen 518129, P.R.China
= =0Ahttp://www.huawei.com
=0A
=0A=0A
= =0A= =0A
=A1This=0A e-mail and its attachments contain confidential informa= tion from HUAWEI, which is intended only for the person or entity whose add= ress is listed above. Any use of the information contained herein in any wa= y (including, but not limited to, total or partial=0A disclosure, reproduct= ion, or dissemination) by persons other than the intended recipient(s) is p= rohibited. If you receive this e-mail in error, please notify the sender by= phone or email immediately and delete it!
=0A
=0A<= /div>=0A
=0A
=0A
=0A
=0A
From: Mohammad Islam [mislam77@yahoo.com]
=0ASent: Wednesday, September 17, 2014 06:22
=0A= To: user@hadoop.apache.org
=0ASubject: Prog= ramatic way to recursively chmod a directory
=0A
=0A
=0A
=0A
=0A
=0A
Hi,
=0AIs there a *programatic* solution to d= o it recursively?
=0A
I'm using= Hadoop 2.3.0.
=0A

=0A
=0A
=0AI tried the followings:
=0A
=0A
=0A
=0A
=0A1. I tried FileSystem.mkdirs( path, permission), it created th= e directory but the permission is not set correctly. 
=0A
=0A
= =0A
=0A
=0A2. I tried FileSystem.setPermisison= (path, permission), it changes only the current directory not recursively.<= /div>=0A
=0A
=0A
=0A
=0A3. I tried to use Fi= leUtil.chmod() with no luck,
=0A
=0A
=0A
=0A
=0A4. new FsShell(conf).run(new String[]{"-chmod" , "-R", "777", "/t= mp/mislam"}); it worked but looks like it is not a good solution to execute= a shell.
=0A
=0A
=0A
= =0A
=0A
=0A
=0A
Questions :
=0A
=0A= 1. Is there a solution for this?
=0A
=0A2. If = not, is there any JIRA for this? I didn't find one.
=0A
=0A3. What next? &n= bsp;
=0A
=0A
=0A
=0A
=0A
=0ARegards,
=0A
=0AMohammad
= =0A
=0A
=0A
=0A
=0A
=0A


<= /div>
---1714046436-1040597217-1410921856=:11724--