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:
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
Do not forget to run the command 'SuSEconfig' afterwards.
AWS Android Ansible Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Container Containers CouchDB DB DNS Database Databases Docker ELK ElasticSearch Elasticsearch Filebeat FreeBSD GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Icingaweb2 InfluxDB Internet Java Kibana Kubernetes LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Rancher SSL Security Shell SmartOS Solaris Surveillance SystemD TLS Tomcat Ubuntu Unix VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder