Anyone running "chmod 777" or "chmod a+rwx" needs to be shot.

At worst, run "chmod a+rwX". Notice the capital "X". That changes only directories and already existing executable files to executable for all, leaving normal files read/write (which is enough to modify/delete/move/rename).

Changing hundreds of untrusted files to executable is a VERY bad idea.

Lesson learned.