简体   繁体   English

对目录HDFS中的所有文件的持久权限

[英]persist permissions to all files in directory HDFS

I am trying to do a chmod 755 on all the directories and files in an HDFS directory but it wont persist all the way down. 我正在尝试对HDFS目录中的所有目录和文件执行chmod 755,但它不会一直持续下去。

for example, if I have a directory like this: 例如,如果我有这样的目录:

/home/set1/data1/file1.txt

I need to do this so my app can access it: 我需要这样做,以便我的应用可以访问它:

haddop fs -chmod 755 /home/set1/*
haddop fs -chmod 755 /home/set1/data1/*
haddop fs -chmod 755 /home/set1/data1/file*
haddop fs -chmod 755 /home/set1/data2/*
haddop fs -chmod 755 /home/set1/data2/file*
haddop fs -chmod 755 /home/set1/data3/*
haddop fs -chmod 755 /home/set1/data3/file*

how do I get the permission to set for each directory and file in the path in HDFS? 如何获得在HDFS路径中为每个目录和文件设置的权限?

使用“ -R”(递归)选项。

hadoop fs -chmod -R 755 /home/set1/data1/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM