Fix log file permissions, only change permissions or owners if needed