vfs_set_acl(9)
πΈ 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms