Permissions can usually be fixed by setting the owner of the file or directory to the user the web server runs as (apache)