Centos 4.3
Hi All:
I just shot myself in the foot by change the owner/perms on the contents of the root directory (my bad!!!). I have done a quick compare with a running RHEL3U8 system and think I have every thing back to what it should be except for new directories media and selinux. Can someone out there currently running 4.3 send me an "ls -l" of their root directory so I can make sure I have got everything back as it should be?
Alternately is there some command within Linux that will fix these up for me (we used to have something like this on SCO OSR5 but I have not been able to locate anything for Linux)?
TIA
Regards, Hugh
I just shot myself in the foot by change the owner/perms on the contents of the root directory (my bad!!!). I have done a quick compare with a running RHEL3U8 system and think I have every thing back to what it should be except for new directories media and selinux. Can someone out there currently running 4.3 send me an "ls -l" of their root directory so I can make sure I have got everything back as it should be?
Alternately is there some command within Linux that will fix these up for me (we used to have something like this on SCO OSR5 but I have not been able to locate anything for Linux)?
Assuming you have (or can obtain) a list of packages on the sytem...
rpm --setperms --setugids <packagename> will restore the package to the original permissions and ownership. This will still leave a few files out in teh cold as not everything is owned by an rpm.
From: Jim Perrin Sent: September 19, 2006 19:26
I just shot myself in the foot by change the owner/perms on the contents of the root directory (my bad!!!). I have done a quick compare with a running RHEL3U8 system and think I have every thing back to what it should be except for new directories media and selinux. Can someone out there currently running 4.3 send me an "ls -l" of their root directory so I can make sure I have got everything back as it should be?
Alternately is there some command within Linux that will fix these up for me (we used to have something like this on SCO OSR5 but I have not been able to locate anything for Linux)?
Assuming you have (or can obtain) a list of packages on the sytem...
rpm --setperms --setugids <packagename> will restore the package to the original permissions and ownership. This will still leave a few files out in teh cold as not everything is owned by an rpm.
Hi Jim:
Thanks for that. I will check it out for sure. Right now my only concern is with the contents of the root directory everything else is fine.
Regards, Hugh
drwxr-xr-x 24 root root 4096 Sep 20 06:18 . drwxr-xr-x 24 root root 4096 Sep 20 06:18 .. -rw-r--r-- 1 root root 0 Sep 20 06:18 .autofsck drwxr-xr-x 2 root root 4096 Aug 31 08:03 bin drwxr-xr-x 4 root root 1024 Aug 31 06:47 boot drwxr-xr-x 10 root root 5800 Sep 20 06:19 dev drwxr-xr-x 84 root root 12288 Sep 20 06:19 etc -rw-r--r-- 1 root root 27599 Aug 5 10:18 .fonts.cache-1 drwxr-xr-x 5 root root 4096 Aug 19 15:17 home drwxr-xr-x 2 root root 4096 Feb 21 2005 initrd drwxr-xr-x 11 root root 4096 Sep 16 08:50 lib drwx------ 2 root root 16384 Aug 5 03:43 lost+found drwxr-xr-x 7 root root 4096 Sep 20 06:19 media drwxr-xr-x 2 root root 4096 Aug 13 04:46 misc drwxr-xr-x 2 root root 4096 Feb 21 2005 mnt drwxr-xr-x 2 root root 4096 Feb 21 2005 opt dr-xr-xr-x 117 root root 0 Sep 20 00:18 proc drwxr-x--- 28 root root 4096 Sep 20 06:24 root drwxr-xr-x 2 root root 12288 Sep 2 12:07 sbin drwxr-xr-x 2 root root 4096 Aug 5 09:44 selinux drwxr-xr-x 2 root root 4096 Feb 21 2005 srv drwxr-xr-x 9 root root 0 Sep 20 00:18 sys drwxrwxrwt 12 root root 4096 Sep 20 06:25 tmp dr-x------ 1 root root 4096 Aug 11 14:50 usb drwxr-xr-x 14 root root 4096 Aug 5 09:46 usr drwxr-xr-x 20 root root 4096 Aug 5 10:03 var
From: Joshua Gimer Sent: September 20, 2006 05:29
drwxr-xr-x 24 root root 4096 Sep 20 06:18 . drwxr-xr-x 24 root root 4096 Sep 20 06:18 ..
[SNIP]
Hi Joshua:
Thanks muchly. That is exactly what I needed.
Regards, Hugh