---
name: "acl_get_permset_mask_np"
section: "3"
platform: "macos"
package: "Libc"
version: "1752.120.2"
release: "macOS 26.5"
platforms: ["macos"]
url: "https://new.carta.tech/acl_get_permset_mask_np"
---

# acl\_get\_permset\_mask\_np(3)

Manipulate ACL permissions using bitmasks

## NAME

**acl\_permset\_mask** – Manipulate ACL permissions using bitmasks

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

**#include \<sys/types.h\>**

**#include \<sys/acl.h\>**

*int*\

**acl\_maximal\_permset\_mask\_np**(*acl\_permset\_mask\_t \* mask\_p*);

*int*\

**acl\_get\_permset\_mask\_np**(*acl\_entry\_t entry\_d*, *acl\_permset\_mask\_t \* mask\_p*);

*int*\

**acl\_set\_permset\_mask\_np**(*acl\_entry\_t entry\_d*, *acl\_permset\_mask\_t mask*);

## DESCRIPTION

The *acl\_permset\_mask\_t* functions are a Darwin extension to the POSIX.1e ACL standard which allow manipulation of permissions in an *acl\_entry\_t* using a bitmask of type *acl\_permset\_mask\_t* rather than a constructed acl\_permset\_t (as done by [acl\_get\_permset(3)](/acl_get_permset/3.md) and [acl\_set\_permset(3)](/acl_set_permset/3.md)).

*acl\_permset\_mask\_t* values may be constructed using bitwise operations over *acl\_perm\_t* values.

**acl\_maximal\_permset\_mask\_np**() sets the value pointed to by *mask\_p* to a bitmask of all valid *acl\_perm\_t* values.

**acl\_get\_permset\_mask\_np**() returns via  *mask\_p* a bitmask of permissions set on the ACL entry *entry\_d*.

**acl\_set\_permset\_mask\_np**() sets the permissions of ACL entry *entry\_d* to match the permission bitmask provided by *mask*.

## RETURN VALUES

The **acl\_maximal\_permset\_mask\_np()** function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

The **acl\_get\_permset\_mask\_np()** function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

The **acl\_set\_permset\_mask\_np()** function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

## ERRORS

The **acl\_get\_permset\_mask\_np**() function fails if:

- \[EINVAL\]

  Argument *entry\_d* is not a valid descriptor for an ACL entry.

The **acl\_set\_permset\_mask\_np**() function fails if:

- \[EINVAL\]

  Argument *entry\_d* is not a valid descriptor for an ACL entry.

- \[EINVAL\]

  Argument *mask* is not a valid bitmask of ACL permissions.

## SEE ALSO

[acl(3)](/acl/3.md), [acl\_add\_perm(3)](/acl_add_perm/3.md), [acl\_clear\_perms(3)](/acl_clear_perms/3.md), [acl\_delete\_perm(3)](/acl_delete_perm/3.md), [acl\_get\_permset(3)](/acl_get_permset/3.md), [acl\_set\_permset(3)](/acl_set_permset/3.md), [posix1e(3)](/posix1e/3.md)

## AUTHORS

Jeremy Huddleston
