Operating System - HP-UX
1850374 Members
2804 Online
104054 Solutions
New Discussion

Re: Filesystem ownership changes

 
hp_user_1
Regular Advisor

Filesystem ownership changes

Hi,

I have a filesystem with user1:group1 ownerships. Everytime I remount it, its ownership and group membership is reset to root:root or root:bin. Any clues???
Thanks
4 REPLIES 4
Paul Sperry
Honored Contributor

Re: Filesystem ownership changes

what does your /etc/fstab file look like?
Paul Sperry
Honored Contributor

Re: Filesystem ownership changes

Note: fstab Stands For "File System Table"

Now, Inorder to Make The Partitions mounted Automaticlly Every Time Your System Boots UP What You Need is to Add Entries in Your /etc/fstab

Here is The Format of The Entry ..

device_name|mount_point|fstype|option|another_option|kaman_option|etc|dump_frequency|fsck_prioritydevice_name: It is the Name Of The Physical Device you Want To Mount ,It could be a network share ,NFS (Network File System ) *nix share or SMB (Server Message Block ) Window$ share ( Network resource ) ..
Ex. /dev/hda1 for physical devices and it is also local
Ex. files.eglug.org:/share/path NFS resource
Ex. //ms.Misr-soft/share-name SMB resource
mount_point: It is the Mount Point Where The File System(Partition) will be Mounted .. Ex. mnt/win_c
fstype: It is the Type Of the File System of the Partition that Will Be Mounted .. Ex. vfat, ext3 , nfs , smbfs , ntfs and swap
Now, The Common Options Are:
user: It Makes the Partition Mountable by any user, but then only that user can unmount it. (For Sure CDROM Drives must have this Option)
users: It Makes the Partition Mountable by any user, and any user can unmount it.
noexec: No Executable Files Allowed (You Should Use this with Windows Partitions or Else All the Files Will be Considered Executables)
ro: Read Only
rw: Read/Write
noauto: Don't mount this at Boot Time (You May be Wondering What its doing in fstab if it is Not Going to Be mounted at Boot Time, this is Used to Simplify mounting Removable Media like CDROMS and FLOPPIES)
uid: Sets Default User id (All Files on your Partition Will be Owned by this User)
gid: Sets Default Groups id (All Files will be Owned by this Group)
sync: Always Sync File System (Don't Cache Content .. Use this with Floppies)
dump_frequency: Is Used to Automatically Backup Files (Only Useful For ext File System)
fsck_priority: Is Used to Determine The Order of Checking File Systems when Doing a System Wide fsck at Boot Time, a Value of Zero will Tell the Kernel Never to Check This File System (This is How it Should be For Most Windows Partitions). The two digits allow for parallel checks when you have two different drives, thus speeding up boottime checks.
Darrel Louis
Honored Contributor

Re: Filesystem ownership changes

Hi,

If you create a directory before it's mounted it will be created as the user used when mkdir was performed.

But when you mount the FS it will be mounted as root. When it's mounted you can modify it to what you prefer.
It's it possible to test it.
Do the following:
ll -d /test
mount /test
ll -d /test
umount /test
mount /test
ll -d /test

GoodLuck

Darrel

hp_user_1
Regular Advisor

Re: Filesystem ownership changes

a