Operating System - HP-UX
1748144 Members
3601 Online
108758 Solutions
New Discussion юеВ

Re: chown -R xyxname:users run from / !!!

 
SOLVED
Go to solution
S.N.S
Valued Contributor

chown -R xyxname:users run from / !!!

Well,

With power comes responsibility -->

One of the Users with "rootly" powers run from / the command

chown -R xyxname:users

and now I dont know which all dir under / have their file ownership changed!

What is the best possible damage control step(s) that I can take at the earliest??

Need your advices very soon!

No replies wont go unrewarded :-)

Dunke/Merci
SNS
"Genius is 1% inspiration, 99% Perspiration" - Edison
23 REPLIES 23
Horia Chirculescu
Honored Contributor
Solution

Re: chown -R xyxname:users run from / !!!

Hello,

-R just aggravated the situation.

You have a problem now...

If you can, you should restore the system from ignite backup.

A lot of problems will arouse from bad settings in the ownership of the directories/files.

>and now I dont know which all dir under / have their file ownership changed!

If you (or your user who did it...) did not forced interruption of the chown process, all the files have ownership changed. Only newly created files snd directories would have the owner as imposed by the creation process.

Best regards,
Horia.
Best regards from Romania,
Horia.
Robert-Jan Goossens
Honored Contributor

Re: chown -R xyxname:users run from / !!!

Hi SNS,

# swverify -F \*

Above will fix all permissions, ownership and date stamp on all installed (swinstall) software.

For the rest of data and apps/db's you probably need to take a look at you backup.

Regards,
Robert-Jan
Kapil Jha
Honored Contributor

Re: chown -R xyxname:users run from / !!!

Question is where this command is run

chown -R xyxname:users

if its under /

everything is gone the only thing u can do is recover from backup, or if its small server and u have little information then u may try to fix major file systems and then fix the things slowlu slowly.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
S.N.S
Valued Contributor

Re: chown -R xyxname:users run from / !!!

Its what I exactly feared!

Is there no way else?
Or rather - do I have to restore the whole server?
Or can I do a recursive copy of / from the Ignite tape -- I dont think so, but surely hope for it!

More points coming on the way for valuable suggestions

Dunke
SNS
"Genius is 1% inspiration, 99% Perspiration" - Edison
Horia Chirculescu
Honored Contributor

Re: chown -R xyxname:users run from / !!!

You should follow the path Robert-Jan Goossens underlined.

Fix the installed (using swverify as suggested) applications and for the rest of the software you must make some time for it. It is a hard job to do but will keep the existing changes (between the backup and current time)

I would take an ignite backup of the current server and then will restore the server and applications/data from the oldest backup I have. Then I will restore data from the newly created ignite backup in another directory using pax in order not to overwrite the ownership/whatever of the files. Then cp will overwrite the files recovered from latest backup..

A lot of work to do...

Horia.
Best regards from Romania,
Horia.
S.N.S
Valued Contributor

Re: chown -R xyxname:users run from / !!!

Sorry,

There is no way except full restorerom tape - it was done from / and all files are affected

Out of curiousity, would it ever have been possible to trace the changes - however so numerous - after such a devastating -R option?

Dunke
SNS
"Genius is 1% inspiration, 99% Perspiration" - Edison
Horia Chirculescu
Honored Contributor

Re: chown -R xyxname:users run from / !!!

>would it ever have been possible to trace the changes

There is no automation mechanism that will get you an option of undoing those actions.

You could periodically save somewhere (in a file) all the files ownership and then you could re-staurate the ownership if something would be bad. You could write 2 scripts for this, one that will create the file with the file names and ownerships and the second for restoring the information when needed)

But in practice this is not used as it is an nonstandard procedure (for a strange situation).

Horia.
Best regards from Romania,
Horia.
Robert-Jan Goossens
Honored Contributor

Re: chown -R xyxname:users run from / !!!

Hi,

Did you try running the swverify command?

If the swverify fails, change the owner:group of swverify first.

$ ll /usr/sbin/swverify
-r-sr-xr-x 11 root bin 2478080 Feb 16 2007 /usr/sbin/swverify

Regards,
Robert-Jan
S.N.S
Valued Contributor

Re: chown -R xyxname:users run from / !!!

Robert & Horia, and all,

The swverify worked-thanks

The only application running is Oracle - that too clustered on the shared VG, ie SAN...

No other applications running on the vg00- the only VG on this server

So just to doubly confirm - I just have to recover from this Disaster from
1. Ignite Backup ---- Am I correct?

Thank a mil,
SNS
"Genius is 1% inspiration, 99% Perspiration" - Edison