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