Results 1 to 2 of 2
Thread: chmod issue
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
06-15-2011 #1
- Join Date
- Jan 2011
- Posts
- 5
chmod issue
we have a customer that ran a sudo chmod +x -R * command on his / filesystem by mistake and now the machine cannot be accessed on the network
Has anyone any idea what chmod command to run to restore the system to its original state ?
thanks
P
-
06-15-2011 #2
This cannot be easily reverted.
Once you gain access to the box either locally or via remote management,
your options are:
a) Make a list of all files and permissions of a comparable system (same distribution, same version, etc)
and apply those on the borked machine
b) look at the changes via a previously installed file integrity scanner like aide, apply like in a)
c) restore the system directorys from backup
d) maybe rpm still works.
Code:rpm -Va
Reinstall these packages via rpm (or yum, if it still works)
e) reinstall
Personally, I would go for e), as my machines are fully automated, config controlled and redundant.
If that is not the case, try d)
Edit:
Seems a little more is needed to get to the list of packages:
Code:rpm -Va --nodeps --noscripts --nodigest --nosignature --nolinkto --nomd5 --nosize --nouser --nogroup --nomtime --nordev | sed -n 's/.*M.* \(.*\)/\1/p' |xargs rpm -qf --queryformat "%{NAME}\n" | sort | uniq
Last edited by Irithori; 06-15-2011 at 05:39 PM.
You must always face the curtain with a bow.