Linux 批量只修改文件或文件夹权限

Linux 批量只修改文件或文件夹权限

新传上去的文件就只有600的权限,要一个个设置起来很麻烦

如果直接   chmod -R 777 的话那就相当于给别人创造机会了,呵呵,我是不建议这么做,如果有人弄到一个后台,那你的整站将不会再安全。

 

只设置文件夹权限为745 文件权限为644

find -type d -exec chmod 745 {} ;  

find -type f -exec chmod 644 {} ;  

或者  

find -type d|xargs chmod 745  

find -type f|xargs chmod 644 

原文地址:https://www.cnblogs.com/cuoreqzt/p/3685159.html