Friday, December 17, 2010

Changing File Permissions

Maybe I missed the memo on this feature of chmod(1), but I really dig it.
chmod o=g foo
That sets the "other" permissions to whatever the "group" permissions are. Combine that with "-R" and you can quickly adjust the "other" permissions of a whole tree to be the same as the file/dir "group" permissions.

Of course, care should be taken so as to not grant everyone write permissions. :)