对于权限777的目录:

find . -type d -perm 777 -exec chmod 755 {} \;

对于权限777的文件:

find . -type f -perm 777 -exec chmod 644 {} \;

不指定文件或目录权限:

find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;

Leave a Reply

Your email address will not be published. Required fields are marked *