fix permissions of files