LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-29-2005, 06:22 AM   #1
mallinath
LQ Newbie
 
Registered: Jun 2005
Posts: 1

Rep: Reputation: 0
TROUBLE: MISTAKENLY CHANGED PERMISSION OF OS . how to recover


Hi have Linux Redhat 2.1 enterprise installed on BLADE server.

Today I comitted a mistake of changing permission from root user .
I issued following command

chown -R oracle:dba ..

I was in /usr02 , where my software was to be installed

instead of chown -R oracle:dba .

I changed the whole system ownership to oracle:dba
anyway how to RESTORE back the file ownerships and permission.
because it has changed permission of /etc , /dev , /var .... everything.

This server has just been finished installing OS .
if there is anyway to recover from installtion CD .
any pointers will be of immense help.

Thanks

Mallinath
 
Old 06-29-2005, 11:28 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
If you just installed this server and haven't configured too much, your better off reinstalling.. as changing the ownership of every file is a nasty way to destroy your system. There are so many different files that are owned by root:root and root:bin and so on..
 
Old 06-29-2005, 12:06 PM   #3
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
Unfortunately, TK is right. This is an excellent reason to:
  1. Create an underpriviledged user account always and
  2. Be bloody well sure of what you type as root before you press enter
I realize it is too late for that now. I'm sorry, you're going to have to reinstall.
 
Old 06-29-2005, 03:30 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,568

Rep: Reputation: 164Reputation: 164
Well..it's a server, so if there are not many home directories it's rather easy. You have only changes ownership. Most files are root:root. Home directories are owned by their users. The rest depends on the services yu have running.
 
Old 06-29-2005, 04:21 PM   #5
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
If you have a full backup you could just do a restore. tar (or dar) will just overwrite your existing files and restore the original ownership/permissions in the process.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C: stdio.h mistakenly removed, how to restore ? Darwish Programming 3 10-17-2005 01:56 AM
changed distro's, having trouble with mounting old partition icepack Linux - Newbie 3 10-12-2005 05:33 AM
Mounting and permission trouble. spitfire999 Linux - Newbie 5 03-28-2005 05:53 PM
Mandrake 9.0 mistakenly reports that packages are installed rose_bud4201 Linux - Software 1 02-14-2004 02:28 AM
permission changed after get thru ftp for a ELF linuxforever Linux - Networking 0 07-24-2003 06:57 AM


All times are GMT -5. The time now is 04:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration