Aside from the reasons stated in muru's answer, I'd like to point out that this would run against POSIX/UNIX permission systems and lead to gaping security holes:
Files in POSIX are stored, retrieved, modified, attribute- and privilege-checked by their name and path. That's the fundamental model of a file: Give the operating system a string that describes what piece of data you want to get, which implies a hierarchy of directories you need to go through to get it, and it checks whether you may, and gives you, if OK, the access to that piece of data, in shape of a file descriptor.
There's a well-defined point in time when that access privilege checking happens, and that's when you ask the operating system to "open" a file, as described above.
Introducing any other identifier – not even necessarily an inode number, anything – that doesn't go through that same process of privilege validation is a security mistake on multiple levels!
circumvention of the path-based access control: the path having to be accessible by you is a restriction on your privileges to open the file. Using bind mounts, hardlinks, NFS… there might be different ways you open a single file. These might all result in different privileges with which you can (or cannot) access the file. UNIX says: Privilege to do something to a file is not only a property stored in the file system entry for that file alone. Your inode-based access scheme disables that restriction, and hence would circumvent a lot of security.
Changes: inodes are, by absolutely no means, not guaranteed to stay constant. Simply not part of the contract.
Worse: Exploiting, an example: I want to read a regularly closed/renamed/opened anew access log. I can't, because the path says I can't (e.g. unprivileged user can't read nor execute /var/log/daemon/, even if the file is 644). I just brute force all inodes until I open one that looks right. Tadah.
inodes are an implementation detail. Original UNIX file systems had that, and it stuck. There's no reason to assume an inode nr being a "useful" thing to any other / modern file system. In fact, my guess would be, from a pure count perspective, of all the file systems the Linux kernel supports, most do not store inode numbers at all, but these are "emulated" by the kernel.
openinode
unsafe – user129393192 Jun 05 '23 at 05:08openinode
is a security issue if these directory permissions are not really doing all that much for the files underneath in the end (and also — why would the files not have the correct permissions to begin with?) – user129393192 Jun 05 '23 at 06:41foo
sets/home/foo
to 700 they can be confident that no one else will have access to files anywhere below (assuming no hard links already exist). You can think of it as belts and suspenders — directory permissions give one level of protection, file permissions another, on top of it. They’re complementary. – Stephen Kitt Jun 05 '23 at 07:36