Operating System - HP-UX
1822897 Members
3711 Online
109645 Solutions
New Discussion юеВ

Question about lost+found directiory ownership

 
SOLVED
Go to solution
Q4you
Regular Advisor

Question about lost+found directiory ownership

Upon creating filesystems and mounting them we the "lost+found" directory. Now it is used for storing after recovering open files after fsck is run on filesystem upon abnormal abort of the system or application.

Question is ->
What should be the permission and owner of "lost+found" directory ? By dafault, it is set to root:root but should this be changed to reflect the actual owner of the filesystem like oracle:dba ?

-TIA

-Q
9 REPLIES 9
RAC_1
Honored Contributor

Re: Question about lost+found directiory ownership

You can change, but it is of no use. This dir is sued to put files that fsck encounters if FS has problems. It will again be reverted back to root:root

Anil
There is no substitute to HARDWORK
Devender Khatana
Honored Contributor

Re: Question about lost+found directiory ownership

Hi,

No it is not required as the files recovered are stored by root and not oracle.

HTH,
Devender
Impossible itself mentions "I m possible"
Steven E. Protter
Exalted Contributor

Re: Question about lost+found directiory ownership

root is supposed to own it.

files go there that have had problems of some kind, for possible recovery.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Q4you
Regular Advisor

Re: Question about lost+found directiory ownership

That means if the files show up in the lost+found directory, needs "root's" intervention about what to do with them ?

If we set the permission to say oracle:dba it would be our oracle guy who take appropriate action on them, meaning if they find anything of value in the "lost+found".

We are talking about managing 800+ filesystems so the ownership of lost+found has some importance on this directory. Hopefully, we never have to see files in lost+found but want to know what is most appropriate way to do it to avoid phone calls to "root" guy :)
Devender Khatana
Honored Contributor

Re: Question about lost+found directiory ownership

Hi,

Your systems have 800 file systems but what if somebody has also some 80 applications in these 800 file systems & files of more than one application lies in same file systems (Say tmp which contains file of all file systems). So how will you summarize this situation ? How will you find which file belongs to whom as anyway fsck is run by root during system startup automatically or while mounting file systems whichever applicable.

Application users comes into effect once file systems are mounted.

HTH,
Devender
Impossible itself mentions "I m possible"
Q4you
Regular Advisor

Re: Question about lost+found directiory ownership

Devendra,

exactly that's the situation we are trying to avoid. Fortunately, we have seprated application filesystems by groups. So very less chance of application files are scattered accross ( and we have some just 6 app run on this dome) except for /tmp.

If the application owner's permissions set for their flesystems, it will be easier for them to decide what to do for files in "lost+found" than root ?

Someone menioned, it gets reset to "root:root" anyway, it that 100% true ? if so, then whole mode/perm setting has no meaning.

Any link on "lost+found" significance would be a 10 begger !
-TIA

-Q

Devender Khatana
Honored Contributor
Solution

Re: Question about lost+found directiory ownership

Hi,

Just have a detailed study of this.

http://docs.hp.com/en/5990-8172/ch06s02.html

I hope it will clarify, moreover if something still left revert back. As I am leaving for the day the response might be a bit delayed.

HTH,
Devender
Impossible itself mentions "I m possible"
Victor BERRIDGE
Honored Contributor

Re: Question about lost+found directiory ownership

Hi,
As already mentionned, when creating the directory lost+found, to not have problems you must be root...
But there is nothing to stop anybody to use the command mklost+found but except root only owner of the file system mount point will succeed and in such case will be the owner of the directory...
That answers you question about
Someone menioned, it gets reset to "root:root" anyway, it that 100% true ? if so, then whole mode/perm setting has no meaning.

---
man mklost+files...
Now all file system maintenance rely on the existence of this "directory" for any bits lost or damaged files etc... and also VXFS which uses it e.g. to put a lock when you are doing some vxfs maintenance (You do have Online-JFS have you?) If somebody removes things from the fs lost+found ( or the directory itself) while you (root) say were into some lets say defragmentation you may end up with VERY frightening messages (It happened to me...
And you are to telephone your family that they can start supper without you...
(I think I was trying to increase size and was looked at bdf, vgdisplay lvdisplay etc but who would think of looking at the presence of lost+found hey?)
After my bad experience I decided to go around all the boxes AND check ownership but where bizarre things were I removed it ans created a new fresh one. but also realized that problems can always occur again since the owner of file system is not root...

My way of seeing things?
1) Make your users understand they must not touch lost+found, but if they look inside and find any strange files they can alert you.
2) Since in normal condition only .fsadm should be there if not empty anything else is a sign of some file system trouble and in such case only root can do something
I have had no crashes these recent years so I cant find anything in lost+found to come up with and animate the debate...
Sorry


All the best
Victor
Q4you
Regular Advisor

Re: Question about lost+found directiory ownership

Thanks everyone !