Don't. Ever. Chmod 777.
Find out what user your Apache runs at, add a group on you system which includes your Apache user and your SSH user and only give that specific group the proper rights. By giving "other" all rights, you create a very dangerous security hole.
<code>
<blockcode>
<apache>
<bash>
<c>
<cpp>
<drupal5>
<drupal6>
<java>
<javascript>
<perl>
<php>
<python>
<ruby>
<xml>
<foo>
[foo]
More information about formatting options
Don't. Ever. Chmod 777.
Find out what user your Apache runs at, add a group on you system which includes your Apache user and your SSH user and only give that specific group the proper rights. By giving "other" all rights, you create a very dangerous security hole.