af_protect(3)
π af_protect β NAME π
ok so bestie, this is the AtFS protection-handling trio: af_chowner, af_chauthor, and af_chmod. they're your lil gatekeepers for who owns what and who's allowed to touch it β¨ (the manual page itself lives under af_protect(3), in case you were wondering, and the whole thing belongs to the Attribute Filesystem (AtFS) π)
πΈ SYNOPSIS πΈ
#include <atfs.h>
int af_chowner (Af_key *aso, Af_user *owner)
int af_chauthor (Af_key *aso, Af_user *author)
int af_chmod (Af_key *aso, int mode)
β¨ DESCRIPTION β¨
okay so here's the tea π β af_chowner and af_chauthor are the two functions that go in and modify the owner and author attribute of an ASO. simple as that, no cap.
but!! and this is the important part β only the superuser is allowed to change the owner of an object history π. like, that's a root-only move, bestie.
and the author attribute of an ASO? that one can only be changed by its owner. so if it's not yours, hands off π.
the Af_user structure has this form, exactly:
typedef struct {
char af_username[MAXUSERNAMELEN];
char af_userhost[MAXHOSTNAMELEN];
char af_userdomain[MAXDOMAIN+1];
} Af_user;
meanwhile af_chmod changes the mode of an ASO π
. for the full deets on that, go peek at chmod(3) β it's giving very much "same energy, different function."
π¦ SEE ALSO π¦
chown (2)chmod (2)
π DIAGNOSTICS π
if something goes wrong, -1 gets returned and af_errno is set to the corresponding error number. so like, always check it, okay? don't just vibe past the return value π
π¨ BUGS π¨
af_chowner does not work.
yeah. it justβ¦ doesn't. iconic of it honestly π not me finding this in the manual and it being right there. anyway, that's the whole warning, fr fr.
AtFS-1.71 π«Ά Fri Jun 25 14:33:16 1993 β that's the version and date this page was born, and that's your cute lil sign-off, bestie ππ go forth and protect your ASOs β¨
π¦ where this page comes from
- debian bookworm: atfs-dev 1.4pl6-15+b1
- ubuntu jammy: atfs-dev 1.4pl6-15
- ubuntu noble: atfs-dev 1.4pl6-16.1build1
- ubuntu resolute: atfs-dev 1.4pl6-17
- ubuntu stonking: atfs-dev 1.4pl6-17
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms