Actually, tmp, cache, administrator/cache and logs folders are special. They are not web accessible and should at all times be writeable. Your extensions DEPEND on those folders being writable. If they are owned by your account's (FTP) user, your server is not using mod_itk/suPHP and you have not enabled Joomla!'s FTP mode (or enabled it but left the password blank for security reasons) then these directories will be unwritable and your extensions will malfunction. What I described is how 95% of sites running on shared hosts are configured.
Are 0777 permissions really that evil? I've already
written all about it. Let me recap this very quickly. 777 is bad because it allows people from
other hosting accounts on the same server to write to those directories. OK, so bloody what? I wrote a malicious PHP file to your site's tmp directory, let's say a C99 variant. Now, in order to pwn your site I need to RUN it. Over the web. If you're using Admin Tools Professional's .htaccess Maker OR if you have put the kind of .htaccess I mentioned above in those directories, the potential attacker CAN NOT run the hacking script, ergo can not pwn your site.
You should know me better than that, man. Before I give security advice I have done my homework. And I never suggest people do something that I'd never do on my own sites. In fact, I DO have some sites on shared hosts and I DO have set them up the way I described. The oldest of them was built on early 2006 and has not been hacked, despite other accounts on the same box having been compromised at least four times in the meantime (I know because I'm a friend of the guy owning the server).
What I want to say is that uttering aphorisms like "777 is evil, never use it" is of little use. In fact, if your files are owned by the Apache user and you have 0755/0644 permissions then
you are as vulnerable as having 0777 permissions. What we ALWAYS have to do when dealing with security is
think. Why is something bad? How can an attacker exploit it? How can we mitigate the risk? If you always do that, you can
easily secure a site to make it tough (but: NOT impossible, don't ever think that's possible) to hack.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!