Operating System - HP-UX
1833237 Members
2634 Online
110051 Solutions
New Discussion

restore all the filesystem to its default owner

 
Wang Xueyan
Advisor

restore all the filesystem to its default owner

If the onwer of the system directories and files such as /opt,/usr,/var has been changed, is there anyway to restore all of the files to its default owner instead of "chown" one by one?
2 REPLIES 2
Robert-Jan Goossens
Honored Contributor

Re: restore all the filesystem to its default owner

Hi,

You can try to use this doc.

http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000066940574

But if you have a backup, it would be easier.

Kind regards,
Robert-Jan.
Bill McNAMARA_1
Honored Contributor

Re: restore all the filesystem to its default owner

You can try to use swverify -F to fix file permissions on patches, but recall that it's not going to be patch sensitive.
swlist -a install_data | sort -k 2
should show an ordered install date (command line off the top of my head - but the idea is right!)
then swverify -F the ordered output.
ignore errors such as filesize changes because of patch sensitivity issues.
You will of course need to have correct permissions on swverify first..

But as stated, this'd be much better if _everything_ was not changed, a restore would be preferred.
It works for me (tm)