vfs_set_acl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

vfs_set_acl β€” set posix acls

okay so this is vfs_set_acl(9), straight from the Kernel API Manual, and it's lowkey iconic 🌈. The whole page is about setting posix acls, and we're gonna make it make sense, fr fr 🫢


✨ SYNOPSIS ✨

int vfs_set_acl (struct mnt_idmap *idmap , struct dentry *dentry , const
       char *acl_name , struct posix_acl *kacl );

πŸŽ€ ARGUMENTS πŸŽ€

  • idmap β€” idmap of the mount. the mount's identity map, basically; keep it close πŸ’–
  • dentry β€” the dentry based on which to set the posix acls. this is the dentry we're doing the ACL glow-up on ✨
  • acl_name β€” the name of the posix acl. the ACL's name tag 🏷️
  • kacl β€” the posix acls in the appropriate VFS format. already in VFS format, no extra conversion arc πŸ¦‹

πŸ’… DESCRIPTION πŸ’…

okay so the function sets kacl. That's the main event, no cap. But bestie, listen: the caller must all posix_acl_release on kacl afterwards. do not forget the release β€” that's the responsible main character move πŸ™ˆ

πŸ”₯ RETURN πŸ”₯

On success you get 0, slay ⭐. On error you get a negative errno, and that's not the vibe 😭.

πŸ‘€ SEE ALSO πŸ‘€

Kernel file ./fs/posix_acl.c, plus the whole friend group: posix_acl_chmod(9), posix_acl_update_mode(9), posix_acl_from_xattr(9), vfs_posix_acl_to_xattr(9), vfs_get_acl(9), and vfs_remove_acl(9). Go say hi πŸ‘‹


mwah πŸ’– this page lives under ./fs, dated October 2026, and it's vfs_set_acl(9) β€” byeee bestie πŸ¦‹

πŸ“¦ where this page comes from