Correct server permissions
This is all subjective to your situation, but...

If you're the sole developer on the site then you just need to make sure that your Apache user's group has write access to your files directories (or any other directories where files are uploaded or generated.  That way both you and apache can access those files using 775 mode.

If you uploaded all of the directories as a user with a primary group that apache is not in, you are better off changing the group to one that apache is in and keeping 775 rather than granting 777 permission.-

If you're on a shared hosting, in some cases group write permission on files is dangerous, so don't do the above in that situation.