Chmod'ding to 777 is BAD. Instruct site admins to change the file owner and if required set file permissions to 660 or 770 for directories.