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

# acl\_from\_mode(3)

create an ACL from file permission bits

## NAME

**acl\_from\_mode** – create an ACL from file permission bits

## LIBRARY

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

## SYNOPSIS

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

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

*acl\_t*\

**acl\_from\_mode**(*mode\_t mode*);

## DESCRIPTION

The **acl\_from\_mode**() function creates a minimal ACL that contains the three entries with tag types ACL\_USER\_OBJ, ACL\_GROUP\_OBJ, and ACL\_OTHER, with permissions corresponding to the owner, group, and other permission bits of its argument *mode*.

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

- \[ENOMEM\]

  The ACL working storage requires more memory than is allowed by the hardware or system-imposed memory management constraints.

## STANDARDS

This is a non-portable, Linux specific extension to the ACL manipulation functions defined in IEEE Std 1003.1e draft 17 (“POSIX.1e”, abandoned).

## SEE ALSO

[acl\_equiv\_mode(3)](/acl_equiv_mode/3.md), [acl\_get\_file(3)](/acl_get_file/3.md), [acl(5)](/acl/5.md)

## AUTHOR

Written by Andreas Gruenbacher ⟨andreas.gruenbacher@gmail.com⟩.
