---
title: "SecAccessCopyOwnerAndACL(_:_:_:_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/secaccesscopyownerandacl(_:_:_:_:_:)"
---

# SecAccessCopyOwnerAndACL(_:_:_:_:_:)

Retrieves the owner and the ACL entries of a given access instance.

## Declaration

```swift
func SecAccessCopyOwnerAndACL(_ accessRef: SecAccess, _ userId: UnsafeMutablePointer<uid_t>?, _ groupId: UnsafeMutablePointer<gid_t>?, _ ownerType: UnsafeMutablePointer<SecAccessOwnerType>?, _ aclList: UnsafeMutablePointer<CFArray?>?) -> OSStatus
```

## Parameters

- `accessRef`: An access instance from which to retrieve the owner and ACL entries.
- `userId`: On return, the user ID that owns the access instance.
- `groupId`: On return, the group ID that owns the access instance.
- `ownerType`: On return, flags that indicate whether the specified user ID or group ID owns the resulting ACL entries. See doc://com.apple.security/documentation/Security/SecAccessOwnerType for details.
- `aclList`: On return, an array of doc://com.apple.security/documentation/Security/SecACL instances associated with the access instance.

## Return Value

Return Value A result code. See Security Framework Result Codes.
