Sample Header Ad - 728x90

Are file permissions copied into the Open File Table?

1 vote
1 answer
74 views
I have a doubt on what the entry created in the *Open File Table* upon calling open() contains. The following schema bytebytego linux descriptor illustrated from bytebytego seems quite good to understand the big picture of opening a file, but in the *Open File Table* I see nothing about file permissions (which are only depicted in the inode at the bottom). This source instead says: > The *open file table* contains several pieces of information about > each file: > > - the current offset (the next position to be accessed in the file) > - a reference count (we'll explain below in the section about fork()) > - **the file mode (permissions)**, > - ... Since the file permissions are stored on disk in its inode, if the last source I mentioned is right, does it mean that the permissions are copied in the entry of the *Open File Table* ? And if so, maybe the schema from bytebytego omitted this detail for the sake of simplicity?
Asked by pochopsp (113 rep)
Oct 8, 2024, 04:15 PM
Last activity: Oct 9, 2024, 12:47 PM