linux下批量更改一个目下的目录和文件的权限

命令如下:

$ chown -R www.www /data/wwwroot/
$ find /data/wwwroot/ -type d -exec chmod 755 {} \;
$ find /data/wwwroot/ -type f -exec chmod 644 {} \;

依次执行即可。 web目录请自行修改。 /data/wwwroot/ 改为自己的

你可能感兴趣的:(linux下批量更改一个目下的目录和文件的权限)