hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohammad Islam <misla...@yahoo.com>
Subject Programatic way to recursively chmod a directory
Date Tue, 16 Sep 2014 22:22:05 GMT
Hi,
Is there a *programatic* solution to do it recursively?
I'm using Hadoop 2.3.0.

I tried the followings:

1. I tried FileSystem.mkdirs( path, permission), it created the directory but the permission
is not set correctly. 

2. I tried FileSystem.setPermisison(path, permission), it changes only the current directory
not recursively.

3. I tried to use FileUtil.chmod() with no luck,

4. new FsShell(conf).run(new String[]{"-chmod" , "-R", "777", "/tmp/mislam"}); it worked but
looks like it is not a good solution to execute a shell.


Questions :
1. Is there a solution for this?
2. If not, is there any JIRA for this? I didn't find one.
3. What next?  


Regards,
Mohammad
Mime
View raw message