As far as I am aware(correct me if I’m wrong), Linux is storing the information about each file’s owner and permissions in a couple of bytes at the beginning of the file.
I know that there are plenty of ways to get that information about a file(both using shell commands and the GUI), but what I’m really wondering is if there is a way to access(view) those permissions in their raw form.
Maybe a more correct way to ask this question is whether there is a way to view the complete file contents(I’ve seen the binary output of a file using hexdump -C test.txt, but it still doesn’t contain those) including the owner/permissions data.
I guess that this information is only accessed in it’s raw form in deep-core code, but I’m really curious if it’s possible to access it in a different way.
>>As far as I am aware(correct me if I’m wrong), Linux is storing the information about each file’s owner and permissions in a couple of bytes at the beginning of the file.
NO!
This information is NOT stored in the file. It is a part of the filesystem’s storage. Different file systems will store the binary data in different places. Some file systems will store in the information in the directory file. You should read more about filesystem permissions here, on Wikipedia
If you want to read permissions, since they are usually accessed from directory listings, look into the ls command.
If you really want to look at the “binary” data in it’s “raw” form, look into opening and reading directory files in a programming language like C.