Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
the filesystem has no owner, usually it can be mounted by the root of a system. The owners, permissions and attributes of the files on the filesystem are stored within the filesystem and are can only be read by the driver of that filesystem (in short: they are filesystem specific data stored on the disk)
Here's the exact scenario: I created a partition as root---no files. When mounted, the mount point showed ownership by root. Also, when mounted, the ownership (and permissions) could be changed. Thus, the filesystem (volume) has owner/permission attributes just like a regular file. I assume that all of this is stored with the filesystem.
no, the filesystem has no ownership, you can take that disk and give it to me and I will be able to mount and read that without knowing about your config.
when you mount a partition you will define the owner. usually it is the root. All the files/dirs stored inside can only be accessed by the filesystem's driver.
In ext2/ext3/ext4 filesystem, information about file type, file size, permissions, extended attributes, number of hard links and so on are stored in the inode of the file. Here is an interesting article about the structure of an ext4 filesystem and how to retrieve information stored in the inodes even from unmounted filesystems (if I understand well). They use some commands like istat or fsstat that are provided by the Sleuth Kit. Have fun!
Edit: FYI the other parts of the featured article are listed here.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.