2
File and folder permissions of 777 is an issue with security. However, some server setups require it for a CMS with any kind of cache to run.
A properly setup server should allow it to run at 755 or at the very least 775. The files and folders should be owned by the user the web server runs as.
The numbers stand for:
7 - read, write and execute
5 - read and execute
4 - read only
The order of the numbers mean:
7/7/7
Owner/Group/Other
The other in the above is anyone in the world. Not a good idea to give them write access to your site.
If the owner of the files is the one that the web server runs as, and the group ownership is the group that the web server user runs as it will work with 775.
If the files are owned by, for instance, root, and the server runs as apache 775 will not work as the apache user would need the "Other" permissions to write and with 775 "Other" only has read and execute.
Most servers now use suEXEC. This allows apache to run as different users on different virtual host accounts, usually under the username of the owner of the account.
Ask your host for more detail in setting the permissions on your site.