Operating System - HP-UX
1824877 Members
3782 Online
109675 Solutions
New Discussion юеВ

chown command! need help!

 
SOLVED
Go to solution
Igor Sovin
Super Advisor

chown command! need help!

Hi
I've mistaken doing command chown.
I did
#chown -R root:sys /
and then pressed Enter.
In what files or folders I've changed ownership?
Is it possible to rool back?
9 REPLIES 9
Eric Antunes
Honored Contributor
Solution

Re: chown command! need help!

Hi Igor,

The only rollback I figure is to restore from your Ignite tape. But since I'm not a system administrator guru wait for them before doing anything more or open a call at HP...

Best Regards,

Eric Antunes
Each and every day is a good day to learn.
Slawomir Gora
Honored Contributor

Re: chown command! need help!

Hi,

you have changed owner and group for all files in your system :(

there is no normal roolback method, you can restore system from backup or restore to another server and collect permissions in shell script which can be used in your primary server.
Arunvijai_4
Honored Contributor

Re: chown command! need help!

Hello,

Have you interrupted the command execution anytime ? if not, you have changed ownership of ALL files and folders. Only way is to Ignite your system.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Bharat Katkar
Honored Contributor

Re: chown command! need help!

This is a very ciritical thing you have done and restoring things is diffcult though not impossible.
Fast solution woould be to restore ignite backup if you have one.

regards,



You need to know a lot to actually know how little you know
Borislav Perkov
Respected Contributor

Re: chown command! need help!

Hi,

The only way is restoring the server. Ignite for system and restore or reinstall the applications and databases. :-(

Regards,
Borislav
James R. Ferguson
Acclaimed Contributor

Re: chown command! need help!

Hi Igor:

If you are running 11.11 or higher:

# swverify -F \* @ /

...will handle the files and directories in the IPD (Installed Product Database) *but* you may have changed ownership on files and directories in non-vg00 filesystems too!

As mentioned, you could also use an Ignite recovery tape to recover vg00.

I'm afraid that you have a significant amount of recovery and detective work to do. Good luck.

Regards!

...JRF...
Kent Ostby
Honored Contributor

Re: chown command! need help!

Or of course you can use the brute force method...

Find another system and check the ownership of files on that box and chown one dir at a time.

/etc
/sbin

"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Kent Ostby
Honored Contributor

Re: chown command! need help!

Sorry.. hit enter too soon.

/etc/
/sbin

are the first and most important to get / keep things running on the system.
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Chan 007
Honored Contributor

Re: chown command! need help!

I agree with JRF, you need to add check_permission=true

Else Ignite...

007