On Tue, Aug 12, 2003 at 11:32:06AM +1000, Ram Smith wrote: > I have a shared directory structure where alot of the files in each > directory have permisions of 644 I wanting to change it so that the > files are chmod 664 letting all users in the group read and write to the > data. without nuking the permissions on the directories along with the > files.
The way to do this properly, as others are showing, is with a: find . -type f | xargs chmod 644 type command. > chmod -R won't work. There doesn't appear to be an option to > exclude dirs with chmod. Here is a way with chmod -R that sort of works, using the cool symbolic expressions of chmod: chmod -R go=u,go-w . This does a bit more than you asked however and assumes that files/and directories have the correct permissions for the owner. It then does these things: Opens dirs to have read and execute permission for group and others Gives programs read and execute permission to group and others. Makes files readable by group and others. -- Norman Gaywood, Systems Administrator School of Mathematics, Statistics and Computer Science University of New England, Armidale, NSW 2351, Australia [EMAIL PROTECTED] Phone: +61 (0)2 6773 2412 http://turing.une.edu.au/~norm Fax: +61 (0)2 6773 3312 Please avoid sending me Word or PowerPoint attachments. See http://www.fsf.org/philosophy/no-word-attachments.html -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
