Refactored permissions copy for generic file