Fix permissions and paths.