Unix Technical Forum

Quick File System Questions

This is a discussion on Quick File System Questions within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hi, I have a few quick file system question. Does setting the owner, group, and permissions on a file ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 03:10 AM
Chris
 
Posts: n/a
Default Quick File System Questions

Hi,

I have a few quick file system question. Does setting the owner, group,
and permissions on a file system simply require mounting the file system
somewhere and then setting the user, group, and permissions on the
mount point? If so, what if the file system is subsequently mounted on
a different mount point? Will the previous owner, group, and
permissions be preserved?

Chris
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 03:10 AM
Laurenz Albe
 
Posts: n/a
Default Re: Quick File System Questions

Chris <cnaugle76@hotmail.com> wrote:
> I have a few quick file system question. Does setting the owner, group,
> and permissions on a file system simply require mounting the file system
> somewhere and then setting the user, group, and permissions on the
> mount point? If so, what if the file system is subsequently mounted on
> a different mount point? Will the previous owner, group, and
> permissions be preserved?


The root directory of a file system is a file just like all
others, as far as permissions are concerned. To access (and change) it,
you must mount the file system (unless you want to fiddle with file
system debugging tools).

When a file system is mounted, its root directory 'supersedes' the mount
point and makes it invisible. All changes to this directory while the
file system is mounted do not affect the shadowed mount point, but the
root directory of the file system.

You should be able to figure out the answer to the last question now.
Consult the documentation if you want more detailed information.

Yours,
Laurenz Albe

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 03:10 AM
Kurt Bremser
 
Posts: n/a
Default Re: Quick File System Questions

Chris <cnaugle76@hotmail.com> wrote in message news:<UN2dnX9UgJp7MqvcRVn-qA@comcast.com>...
> Hi,
>
> I have a few quick file system question. Does setting the owner, group,
> and permissions on a file system simply require mounting the file system
> somewhere and then setting the user, group, and permissions on the
> mount point? If so, what if the file system is subsequently mounted on
> a different mount point? Will the previous owner, group, and
> permissions be preserved?
>
> Chris


Once a file system is mounted, setting group, owner and permissions is
applied on the root directory of that file system. This root directory
is actually the first file in that system, and its inode resides also
in the fs's inode table.
Once you unmount the file system, the mount point retains ist original
ownership and permissions, while the file system takes its permissions
with it to any other mount point.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-05-2008, 03:10 AM
Scott Doyland
 
Posts: n/a
Default Re: Quick File System Questions

Chris <cnaugle76@hotmail.com> wrote in message news:<UN2dnX9UgJp7MqvcRVn-qA@comcast.com>...
> Hi,
>
> I have a few quick file system question. Does setting the owner, group,
> and permissions on a file system simply require mounting the file system
> somewhere and then setting the user, group, and permissions on the
> mount point? If so, what if the file system is subsequently mounted on
> a different mount point? Will the previous owner, group, and
> permissions be preserved?
>
> Chris


I reckon you could have tested this quicker than posting the message
;-)
The answer is yes, the FS will keep its previous owner etc if you
change the mount point.

Note that the underlying perms of the directory that you mount over
can actually affect the FS. I dont *think* its supposed to work this
way, but I have seen, on AIX 5.2, a FS mounted and given perms of 777
and even then a non-root user couldnt do various things in the FS
(cant remember details). We had to umount and change the perms on the
underlying directory and remount.

I suspect this isnt correct behaviour - its something to watch out
for.

Scott
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-05-2008, 03:10 AM
jsb_bh
 
Posts: n/a
Default Re: Quick File System Questions

Hi Chris,

Any access to the mount point refers to the directory (can be the
root) of a filesystem(FS) that got mounted. So, attempts to perform
any operation (provided you have appropriate privileges) on the mount
point is, in actual, operating on the mounted directory of the FS.

ls/find gets the owner and group identification numbers from the
database that your system is configured to use, like, /etc/passwd,
/etc/group, NIS, etc. and displays the corresponding names.

The owner, group and permission of a file in a FS are preserved only
if its i-node is not corrupted.

jsb_bh

Chris <cnaugle76@hotmail.com> wrote in message news:<UN2dnX9UgJp7MqvcRVn-qA@comcast.com>...
> Hi,
>
> I have a few quick file system question. Does setting the owner, group,
> and permissions on a file system simply require mounting the file system
> somewhere and then setting the user, group, and permissions on the
> mount point? If so, what if the file system is subsequently mounted on
> a different mount point? Will the previous owner, group, and
> permissions be preserved?
>
> Chris

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:26 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com