chmod +777 is not valid. we don't want world writable files anyway, so chown to the correct user/group