As a Linux beginner, I am trying to comprehend how file permissions are created and saved. Of particular interest to me are permissions for files on detachable USB devices. With my very limited knowledge of how these file systems work, I get the general idea that a file's permissions (and ownership and block location and so on) is stored in its inode. So, the file's name can be looked up in its directory, which provides the inode number, which can then be used to look up the permissions in the inode.
Next, I have this vague notion that the inodes are stored in tables that are distributed throughout the physical storage devices, so that an inode table is reasonably close to the file(s) it describes. I don't know if these means it is in the same group block, or just the same disk cylinder, or what. Too many opinions out there.
Anyway, when I attach a USB drive and then mount it, I assume the mounting process must be creating inode mappings to all the files on the USB drive. I would really like to know if the inode tables for the files on the USB drive are actually written onto the USB drive. If so, what happens when I unmount it? Does the system take all those inodes back into the pool, and the permissions info about the files is simply gone? When I re-attach and remount the drive later, is a fresh batch of inode tables created? And therefore do I have to re-specify the desired permissions?
Maybe I'm asking the wrong questions because my knowledge of all this is so rudimentary. But I find file permissions to be rather bewildering and challenging. If I could better understand what is stored where, and how persistent or temporary it is, it would be very helpful