---
name: "acl_from_text"
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_from_text"
---

# acl\_from\_text(3)

create an ACL from text

## NAME

**acl\_from\_text** – create an ACL from text

## LIBRARY

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

## SYNOPSIS

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

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

*acl\_t*\

**acl\_from\_text**(*const char \*buf\_p*);

## DESCRIPTION

The **acl\_from\_text**() function converts the text form of the ACL referred to by *buf\_p* into the internal form of an ACL and returns a pointer to the working storage that contains the ACL. The **acl\_from\_text**() function accepts as input the long text form and short text form of an ACL as described in [acl(5)](/acl/5.md).

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\_from\_text**() 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\_from\_text**() function returns a value of (acl\_t)NULL and sets *errno* to the corresponding value:

- \[EINVAL\]

  The argument *buf\_p* cannot be translated into an ACL.

- \[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\_free(3)](/acl_free/3.md), [acl\_get\_entry(3)](/acl_get_entry/3.md), [acl\_to\_text(3)](/acl_to_text/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⟩.
