How to recursively change the permissions of files and directories in ubuntu?

Share Me
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Now in this post i would like to share with you a example of How to recursively change the permissions of files and directories in ubuntu? Sometimes, you need to give the recursively change the permissions for specific files and also directories in ubuntu Operation system. We can open the terminal and need to run the bellow command,

so let’s try on this way :

Example

sudo find foldername -exec chmod a+rwx {} ";"

For give more specific!

sudo find foldername -type d -exec chmod 755 {} ";"
sudo find foldername -type f -exec chmod 644 {} ";"

Read Also : How to convert Object into Array in PHP?

Thanks for read. I hope it help you. For more you can follow us on facebook.

About code chef

My name is Shahriar sagor. I'm a developer. I live in Bangladesh and I love to write tutorials and tips that will help to other Developer's. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

View all posts by code chef →