Reputation: 4508
I have main folder in which I have multiple folders and files. Main folder has owner X and group permission Y. Inside it all folders and files have owner X and group permission x. But I want all of them to have group permission Y also like the main folder. What's the shortest way to make it happen?
Upvotes: 0
Views: 2903
Reputation: 32391
If you want to change the group, without changing the owner, you can use
chgrp -R GROUP FILE
Upvotes: 1
Reputation: 4508
That's what I needed to solve the problem:
sudo chown -R username:group directory
Upvotes: 2
Reputation: 1671
Just use the -R option that will apply your permissions recursively(i.e. file and folders under the parent folders). It goes like this:
chmod -R <permissions> /myfolder
Upvotes: 0