<!--
{
  "availability" : [
    "macOS: 10.7.0 - 10.10.0"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SecAccessCreateWithOwnerAndACL(_:_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@F@SecAccessCreateWithOwnerAndACL"
  },
  "title" : "SecAccessCreateWithOwnerAndACL(_:_:_:_:_:)"
}
-->

# SecAccessCreateWithOwnerAndACL(_:_:_:_:_:)

Creates a new access instance using the owner and ACL entries you provide.

```
func SecAccessCreateWithOwnerAndACL(_ userId: uid_t, _ groupId: gid_t, _ ownerType: SecAccessOwnerType, _ acls: CFArray?, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>?) -> SecAccess?
```

## Parameters

`userId`

The user ID that owns this ACL.

`groupId`

The group ID that owns this ACL.

`ownerType`

Flags that control whether the specified user ID or group ID owns the resulting ACL. See [`SecAccessOwnerType`](/documentation/Security/SecAccessOwnerType) for details.

`acls`

An array of ACL entries to associate with the access instance.

`error`

The address of an error instance. On error, the return value is `nil`, and the variable referenced by this parameter is overwritten with a <doc://com.apple.documentation/documentation/CoreFoundation/CFError> instance that provides more information.

## Return Value

The new access instance. In Objective-C, call the <doc://com.apple.documentation/documentation/CoreFoundation/CFRelease> function to release it when you are finished using it.

## Discussion

Use this method to create a customized access instance from [`SecACL`](/documentation/Security/SecACL) instances that you’ve created with the [`SecACLCreateWithSimpleContents(_:_:_:_:_:)`](/documentation/Security/SecACLCreateWithSimpleContents(_:_:_:_:_:)) method. If you want a default access instance, use the [`SecAccessCreate(_:_:_:)`](/documentation/Security/SecAccessCreate(_:_:_:)) method instead.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)