find /start/dir -gid nnn -exec chmod <modes> {} \;
# where nnn is the numeric id of your group
Main Topics
Browse All TopicsIs there an easy way in Linux os to change permission on (chmod) all my folders and files in group instead of one file or one folder each time?
Thank You
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
As long as you can print out the file names using some filter arrangement as demonstrated by the various mechanisms above, you can use awk or similar to create the command 'chmod +rwx afile.name' and then pipe the command to a shell.
The joy of linux is that you try and break everything down into little steps, and then put them together to create what you need:)
...as does mine, except, perhaps I ought to give an example:
find / -gid xyz | awk '{print "chmod group.group",$1}' | /bin/sh
The great thing about the above is that it is very flexible. You can create a list of files that includes only text files with the string .txt by adding a grep pipe:
find / -gid xyz | grep ".txt" | awk '{print "chmod group.group",$1}' | /bin/sh
etc
Using the awk command you can carry out any action you wish on the files by building the necesary command string before piping it to a shell.
Top tip (because I like top tips!) is to test the command line without the | /bin/sh first to check that the commands being produced are the commands that you want actioning. Only then, send them to the shell.
I agree that ahoffman was the first person to come up with a solution....I just think my approach is better;)
OK - ahoffmann wins on a more succint way of doing that one as well ;) - I was trying to break the problem down into nice simple steps......./me goes and looks for the URL for obfuscated C code contest.....and finds it:)
http://www1.us.ioccc.org/m
Business Accounts
Answer for Membership
by: chris_calabresePosted on 2003-10-07 at 11:50:58ID: 9508166
Change everything under a particular directory:
chmod -R <modes> /some/where
Change all files matching a particular pattern:
chmod <modes> *.fubar
Change all files under a particular directory matching a particular pattern:
find /some/where -name '*.fubar' \
-exec chmod <modes> {} ';'