How To: Reset (root) system permissions on SuSE Linux
Last Update: 26.06.2008
What if you accidentally change the permissions of your whole system or an important directory and you don't remember which permission it had by default? For example the following command can totally insecure your system and it might not run as wished anymore:
cd /
chmod -R 777 *
Of course there could be tons of examples about chmod's or chown's accidentally
commited, but here's a solution.
There is a command which could be described as a "Reset to Factory Default"
button like you have it on a router. It basically reads out the permissions
of the rpm packages again and adjusts the permissions in the system.
for i in $(rpm -qa); do rpm --setperms $i; done
SuSEconfig
Do not forget to run the command 'SuSEconfig' afterwards.