---
name: "acl_init"
section: "3"
platform: "linux"
package: "acl"
version: "2.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "freebsd", "macos"]
url: "https://new.carta.tech/acl_init"
---

# acl\_init(3)

initialize ACL working storage

## NAME

**acl\_init** – initialize ACL working storage

## LIBRARY

Linux Access Control Lists library (libacl, -lacl).

## SYNOPSIS

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

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

*acl\_t*\

**acl\_init**(*int count*);

## DESCRIPTION

The **acl\_init**() function allocates and initializes the working storage for an ACL of at least *count* ACL entries.  The ACL created initially contains no ACL entries. A pointer to the working storage is returned.

This function may cause memory to be allocated.  The caller should free any releasable memory, when the new ACL is no longer required, by calling [acl\_free(3)](/acl_free/3.md) with the *(void\*)acl\_t* returned by **acl\_init**() as an argument.

## RETURN VALUE

On success, this function returns a pointer to the working storage.  On error, a value of (acl\_t)NULL is returned, and *errno* is set appropriately.

## ERRORS

If any of the following conditions occur, the **acl\_init**() function returns a value of (acl\_t)NULL and sets *errno* to the corresponding value:

- \[EINVAL\]

  The value of count is less than zero.

- \[ENOMEM\]

  The *acl\_t* to be returned requires more memory than is allowed by the hardware or system-imposed memory management constraints.

## STANDARDS

IEEE Std 1003.1e draft 17 (“POSIX.1e”, abandoned)

## SEE ALSO

[acl\_get\_file(3)](/acl_get_file/3.md), [acl\_free(3)](/acl_free/3.md), [acl(5)](/acl/5.md)

## AUTHOR

Derived from the FreeBSD manual pages written by Robert N M Watson ⟨rwatson@FreeBSD.org⟩, and adapted for Linux by Andreas Gruenbacher ⟨andreas.gruenbacher@gmail.com⟩.
