World-writable (777) is not nearly as bad as it seems. First, it is not writable by anyone in the world, just from people on the same server as you. Second, your account probably has a open_basedir restriction in effect for php which means that only your account can access your files, even if they are world readable.
Yes, the web-server is in a different group than you. So, you must stay with 777, but like I said earlier, that is still fairly secure.