mode_strip_umask(9)
πΈ mode_strip_umask(9) β a Kernel API Manual moment πΈ
okay bestie, buckle up, we're in the Kernel API Manual today and this one is genuinely iconic. it's mode_strip_umask, and no cap, it's the little helper that decides where your umask gets stripped. main character energy fr fr π
β¨ NAME β¨
mode_strip_umask β the girl who handles vfs umask stripping, periodt π
π¦ SYNOPSIS π¦
umode_t mode_strip_umask (const struct inode *dir , umode_t mode );
literally just look at her. two arguments, one umode_t return, zero drama β¨
π ARGUMENTS π
dirβ the parent directory of the new inode. like, where the new baby inode is gonna live πmodeβ the mode of the new inode that's about to be created insidedir. this is the vibe we're working with π
π DESCRIPTION π
okay so here's the tea π΅ β in most filesystems, whether umask stripping happens here or somewhere else depends on one thing: does the filesystem support POSIX ACLs or not?
- if the filesystem doesn't support POSIX ACLs β the umask stripping is done directly in here. right here. this function. she ate π
- if the filesystem does support POSIX ACLs β the umask stripping gets deferred, postponed, pushed back, until the filesystem calls
posix_acl_create. she's a busy girl, she'll get to it later π«Ά
and then there's the third group, the β¨specialβ¨ ones. some filesystems (hi, NFSv4 π) also want to avoid umask stripping by the VFS β but they don't support POSIX ACLs. awkward, right? π good news: those filesystems can set SB_I_NOUMASK to get that exact effect without declaring that they support POSIX ACLs. loophole queen behavior, honestly π
β RETURN β
returns mode β that's it, that's the return. short and sweet, ngl πΈ
π§ SEE ALSO π§
- Kernel file
./include/linux/namei.h end_removing(9)retry_estale(9)
go read those too, iykyk π
π little reminder bestie: the POSIX ACL support question is the whole plot here, so don't skip it, fr fr. and SB_I_NOUMASK is the move for the NFSv4 girlies who want VFS to leave their umask alone π
and that's the whole page, you're so welcome π this lil masterpiece lives in ./include/linux, dated October 2026, and it's filed under mode_strip_umask(9) β go forth and strip those umasks responsibly, 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