changing permissions of files in a directory recursively

孤人 提交于 2019-12-02 21:25:01
Randeep

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.

It looks to me like you don't have permission to change NonVolatileStore.cpp.

Are you aware of chmod's -R switch that recursively changes permissions?

if you have the root privilege, try:

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

It could be that you simply don't own that file. Run an ls -l on it to see full permissions and who the owner is.

It could also be the filesystem is read only.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!