chown_ok(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– chown_ok(9) β€” Kernel API Manual πŸ’–

okay bestie, welcome to the Kernel API Manual page for chown_ok(9) β€” it’s giving permission-checking main character energy, and we’re gonna read it together. 🫢


✨ NAME ✨

chown_ok β€” verify permissions to chown inode πŸ’…

🌸 SYNOPSIS 🌸

bool chown_ok (struct mnt_idmap *idmap , const struct inode *inode ,
vfsuid_t ia_vfsuid );

πŸŽ€ ARGUMENTS πŸŽ€

  • idmap β€” the idmap of the mount the inode was found from. πŸ—ΊοΈ
  • inode β€” the inode we’re checking permissions on. πŸ”
  • ia_vfsuid β€” the uid to chown the inode to. πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

So here’s the vibe: if the inode has been found through an idmapped mount, you must pass the idmap of the vfsmount through idmap. No skipping that, bestie. Then this function will take care to map the inode according to idmap before checking permissions. ✨

On non-idmapped mounts β€” or if permission checking is to be performed on the raw inode β€” simply pass nop_mnt_idmap. Easy. Periodt. πŸ’…

lowkey important: that idmap passage is not optional for idmapped mounts, and nop_mnt_idmap is the move for non-idmapped mounts or raw-inode checking. πŸ‘‘

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./fs/attr.c:


and that’s the whole page, bestie β€” sourced from ./fs, dated October 2026, signing off as chown_ok(9). slay πŸ’–βœ¨

πŸ“¦ where this page comes from