I am aware of Apparmor and specifically how it can be used to limit a program's access rights where of the file-system permissions otherwise allow. What I'm less clear on is whether it's possible for Apparmor or any similar security module to completely override a program's access rights. Can they grant a program access to read/write/execute files that the user otherwise has no access to.

I'm asking for what the Linux Kernel will allow such a security module to do, not what existing security modules can be configured to do.

Can security modules completely override Linux Kernel's access model?

1 Answer 1


This doesn’t seem to be mentioned in the kernel’s LSM documentation, but no, security modules can’t completely override the kernel’s access model, they supplement it.

For example, checks before execution include those in do_open_execat, which checks the permissions; the LSM hooks are called later (look for security_). Other examples include all the functions in fs/namei.c which call functions like may_delete before the relevant LSM hooks.

  • That's a pity. Thanks for the definitive answer! Aug 13, 2020 at 21:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .