Question: why chmod 777 is bad?
Answer: A malicious user could change what's in there or just read it and happily take your money. For servers, the chief danger is that an exploited bug in the server code could allow an attacker to access anything that the server process has rights to -- which would include anything that has the 777 permission set.