fw116 is right. Although there are server scenarios where you might need to temporarily set your permissions to 777 to install components, etc, you should always change the permissions back to something more restrictive immediately after installation. 777 is definitely not a setting you want to keep for very long. I always use the most restrictive settings I can, only changing to something less restrictive when required and only for the short time needed to make a change (which is never in my case).
It is helpful to talk with your web host about the proper permissions. Security is very important.
Greg