且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

递归更改目录中文件的权限

更新时间:2022-11-05 12:12:07

you can run the following command:

 #chown -R directory_path

But it will change the permissions of directories also.

For only files, you can run.

 #find directory_path -type f -exec chmod 644 {} ;

It also looks like you dont have enough permissions. try

 #sudo find directory_path -type f -exec chmod 644 {} ;

or run the command as root user.