inode_permission(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… inode_permission(9) β€” the kernel API manual page, bestie edition ✨

Okay so welcome to inode_permission(9), straight out of the Kernel API Manual. Yes, that's a section 9 page, and yes, it's giving "kernel dev at 2am drinking iced coffee" energy. Buckle up πŸŽ€


✨ NAME ✨

inode_permission β€” check for access rights to a given inode πŸ¦‹


🌸 SYNOPSIS 🌸

int inode_permission (struct mnt_idmap *idmap , struct inode *inode ,
int mask );

πŸ’– ARGUMENTS πŸ’–

  • idmap β€” the idmap of the mount that the inode was found from. literally the mapping context, she's the one who knows the vibes of the mount πŸ‘‘
  • inode β€” the inode you wanna check permission on. the main character, no cap πŸ’…
  • mask β€” the right you're checking for: MAY_READ, MAY_WRITE, MAY_EXEC πŸ”₯

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically, this bad boy checks for read/write/execute permissions on an inode. iconic behaviour honestly.

The way it does it: we use fs[ug]id for this, which lets us set arbitrary permissions for filesystem access without changing the "normal" UIDs which are used for other things. which is lowkey genius 🧚

⚠️ Heads up bestie: when checking for MAY_APPEND, MAY_WRITE must also be set in mask. like, both. not one. both. fr fr 😭

🌈 SEE ALSO 🌈

Kernel file ./fs/namei.c β€” and omg the friend group here is huge, she knows everyone:


okay that's the whole page, you ate that 🫢 this listing comes from ./fs, October 2026, and it's inode_permission(9) β€” go forth and check those permissions, bestie πŸ’œβœ¨

πŸ“¦ where this page comes from