Once more I came across a script where people were setting access rights using 'chmod -R 777 .' (just saw it as "make sure we have all permissions on this file")
While this is a very pragmatic approach (in fact it fixes every access right issues), it's not the way it should be done.
Instead of setting hard permissions, use the modification syntax : chmod g+w to add group write permissions on top of already existing permissions.
Also quite unknown to many people : chmod g+X (yes, capital X) to only add group execute permissions to those files (and directories) that are already executable by the user - nothing more.