First of all ... 777 is NEVER a good idea, anybody on the same machine can write into your directory if he is able to guess the complete path. But I do know, that there are hosting configurations here 777 is the only way to make things work with uploading and creating files and/or folders. In general, only give the minimum rights necessary.
The folders where your web-server (and Website Baker) needs to write are: templates, modules, languages, temp, pages and media. For all the others you can disable the writing option. Even some of the ones listed above do not need to be writable all the time if you don not wish to install modules, language-files or templates constantly

cheers
Klaus