ACL_SET_PERMSET(3)
β¨ ACL_SET_PERMSET(3) β¨
okay bestie, so this is a page from the Library Functions Manual and it's literally all about acl_set_permset β say it with me, "set permset," it's giving exactly what it sounds like π
π NAME π
acl_set_permset β set the permission set in an ACL entry
no cap, that's the whole job. it sets. the permset. in an entry. π
πΈ LIBRARY πΈ
Linux Access Control Lists library (libacl, -lacl).
so like, link with -lacl or this whole vibe is not happening for you π«Ά
β¨ SYNOPSIS β¨
#include <sys/types.h>
#include <sys/acl.h>
int
acl_set_permset(acl_entry_t entry_d, acl_permset_t permset_d);
π¦ DESCRIPTION π¦
so the acl_set_permset() function sets the permission set of the ACL entry indicated by the argument entry_d to the permissions contained in the argument permset_d. like, you hand it an entry, you hand it a permset, and boom β that entry now has those permissions. main character energy fr fr π
and here's the part that's lowkey important: any ACL entry descriptors that refer to the entry containing the permission set referred to by permset_d shall continue to refer to those entries. and any ACL entry descriptors that refer to the entry referred to by entry_d shall continue to refer to that entry. nothing gets re-pointed, nobody gets ghosted, the descriptors stay exactly where they were. we love stability. periodt π
π₯ RETURN VALUE π₯
acl_set_permset() returns the value 0 if successful πβ¨
otherwise, the value -1 is returned and the global variable errno is set to indicate the error. so yeah, if you get a -1, go read errno, it's spilling the tea about what went wrong π
π ERRORS π
if any of the following conditions occur, the acl_set_permset() function returns -1 and sets errno to the corresponding value:
[EINVAL]β The argumententry_dis not a valid descriptor for an ACL entry.[EINVAL]β The argumentpermset_dis not a valid descriptor for a permission set within an ACL entry.[EINVAL]β The argumentpermset_dcontains values which are not validacl_permset_tvalues.
so basically if your descriptors are fake, or your permset has values that aren't real acl_permset_t values, EINVAL said "not today" π
π STANDARDS π
IEEE Std 1003.1e draft 17 (βPOSIX.1eβ, abandoned)
rip POSIX.1e, gone but not forgotten ποΈ the draft was abandoned, bestie, that's just the lore.
π SEE ALSO π
acl_add_perm(3), acl_clear_perms(3), acl_delete_perm(3), acl_get_perm(3), acl_get_permset(3), acl_get_qualifier(3), acl_get_tag_type(3), acl_set_qualifier(3), acl_set_tag_type(3), acl(5)
go read the whole squad, they all hang out together iykyk π§
π 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>.
thank you for your service, legends π«Ά
and that's the whole page!! this came from the Linux ACL crew, dated March 23, 2002 β yeah it's vintage, it's iconic, it's ACL_SET_PERMSET(3) and it ate π
β
π¦ where this page comes from
- alpine 3.22: acl-doc 2.3.2-r1 Β· LGPL-2.1-or-later AND GPL-2.0-or-later
- alpine 3.23: acl-doc 2.3.2-r1 Β· LGPL-2.1-or-later AND GPL-2.0-or-later
- alpine 3.24: acl-doc 2.3.2-r1 Β· LGPL-2.1-or-later AND GPL-2.0-or-later
- arch rolling: acl 2.4.0-1 Β· LGPL-2.1-or-later AND GPL-2.0-or-later
- centos-stream 10: libacl-devel 2.4.0-2.el10 Β· LGPL-2.1-or-later
- centos-stream 9: libacl-devel 2.4.0-2.el9 Β· LGPLv2+
- centos-stream 9: libacl-devel 2.4.0-2.el9 Β· LGPLv2+
- debian bookworm: libacl1-dev 2.3.1-3
- debian trixie: libacl1-dev 2.3.2-2+b1
- fedora 43: libacl-devel 2.3.2-4.fc43 Β· LGPL-2.1-or-later
- fedora 43: libacl-devel 2.3.2-4.fc43 Β· LGPL-2.1-or-later
- fedora 43: libacl-devel 2.4.0-1.fc43 Β· LGPL-2.1-or-later
- fedora 43: libacl-devel 2.4.0-1.fc43 Β· LGPL-2.1-or-later
- fedora 44: libacl-devel 2.3.2-6.fc44 Β· LGPL-2.1-or-later
- fedora 44: libacl-devel 2.3.2-6.fc44 Β· LGPL-2.1-or-later
- fedora 44: libacl-devel 2.4.0-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: libacl-devel 2.4.0-1.fc44 Β· LGPL-2.1-or-later
- nixpkgs unstable: acl 2.4.0
- opensuse-leap 16.0: libacl-devel 2.4.0-160000.1.1 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: libacl-devel 2.4.0-160000.1.1 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: libacl-devel 2.4.0-160000.1.1 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: libacl-devel 2.4.0-160000.1.1 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- ubuntu jammy: libacl1-dev 2.3.1-1
- ubuntu noble: libacl1-dev 2.3.2-1build1
- ubuntu noble: libacl1-dev 2.3.2-1build1.1
- ubuntu resolute: libacl1-dev 2.3.2-2
- ubuntu stonking: libacl1-dev 2.4.0-1
- (C) 2002 Andreas Gruenbacher, <andreas.gruenbacher@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms