fix permissions on copied files