LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 05-16-2012, 08:31 AM   #1
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
filesystem owner and permissions--where stored?


I'm doing a bit of re-learning---please bear with me.

If I have an unmounted partition (file system, to be more precise), I cannot find a way of knowing the owner, permissions, etc.

If I mount and then change the attributes (chown, chmod, etc.), then that info stays with the partition after unmounting and re-mounting.

So---where is this info stored, and is it accessible without mounting?
 
Old 05-16-2012, 08:56 AM   #2
anon258
LQ Newbie
 
Registered: Nov 2010
Distribution: Archlinux
Posts: 18

Rep: Reputation: 0
If that partittion is for example /dev/sda1 you can find in it permission information
 
Old 05-16-2012, 10:05 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Original Poster
Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by Fantastic View Post
If that partittion is for example /dev/sda1 you can find in it permission information
If it's not mounted?
 
Old 05-16-2012, 11:35 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
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)
 
Old 05-17-2012, 05:29 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Original Poster
Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by pan64 View Post
the filesystem has no owner...
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.
 
Old 05-17-2012, 05:44 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
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.
 
Old 05-17-2012, 06:08 AM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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.

.

Last edited by colucix; 05-17-2012 at 06:30 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is .gvfs? Owner is ?, group ?, permissions are ?????????, size is ? 809areacode Linux - General 1 08-19-2011 12:02 PM
permissions: how to have files always have the same owner/mod? browny_amiga Linux - Software 3 10-09-2010 01:57 PM
permissions and owner of ntfs mounted drive bloodyscript Linux - Newbie 4 11-10-2008 05:24 PM
permissions and owner for shared drive goober3 Linux - Newbie 2 08-31-2008 10:45 PM
creating directories with owner/permissions that stick amg_ Linux - Newbie 4 11-28-2007 12:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration