LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-20-2012, 09:17 AM   #1
djexploit
LQ Newbie
 
Registered: May 2012
Posts: 3

Rep: Reputation: Disabled
CentOS Messed Up


Hi, my CentOS has been messed up somehow. I used NoMachine to connect to the vps and it worked perfectly fine. Until i started to play with the permissions xD.
So I just need to know how to fully restore the default centos on my server. Isnt there some kind of command that just resets everything the way it was before?
 
Old 05-20-2012, 09:39 AM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
You can run rpm with the "--setperms" option to restore the original permissions. Doing this for all packages gets a little more complicated, but this should work (please forgive me for not trying this on my system):
Code:
 rpm -qa | xargs rpm --setperms
If you've also made ownership changes, you might need to do this again with the "--setugids" option. Note that these will only affect files that were installed with the RPM. Files that were created later by running programs will not be affected.
 
Old 05-20-2012, 09:44 AM   #3
djexploit
LQ Newbie
 
Registered: May 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Cool. If it worked .

When i do a command, whatever it can be it says this:

-bash: /usr/bin/xargs: Permission denied


I need to fix this ;o.
 
Old 05-20-2012, 10:28 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by djexploit View Post
I need to fix this
Given your first post I'd say you need to fix the hiatus in your knowledge before asking your provider to restore the VPS image for you...
 
Old 05-20-2012, 10:48 AM   #5
djexploit
LQ Newbie
 
Registered: May 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
.... I'm new to linux, don't know a lot about it so. No idea how this error has occured tho, i didnt change a lot in the permissions.
 
  


Reply



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
CentOS Wont Boot - LVM2 Filesystems messed up SaveVM Linux - Virtualization and Cloud 2 04-22-2012 05:42 PM
Booting Centos 5.4 Issue: "CentOS CD Not found in any of the media drives. Please i g.navink Red Hat 1 04-07-2010 04:12 PM
Centos / Fedora won't boot: kernel panic due to LVM messed up!!! please help!!!!! smileamiledr Linux - Server 23 01-21-2010 09:53 AM
LXer: Install CentOS 5 DomU on CentOS 5 Dom0(64 bit) from NFS share LXer Syndicated Linux News 0 11-09-2007 03:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:51 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
Open Source Consulting | Domain Registration