Fix permissions of files