Fix the permissions of files