fix permissions to match doctypes