> Problem: ======= Permissions and Ownership on critical - TopicsExpress



          

> Problem: ======= Permissions and Ownership on critical system files (in /etc/) directory modified. This may cause the system to not boot, lots of errors and Kernel Panic. cause: ===== Someone accidentally typed chmod -R 777 /etc Solution: ========= The RPM package manager maintains a database for all files that it installs onto the system. This includes information such as the filename, installation path, owning package and the file system ownership and permissions (including SELinux file context information). In the event that ownership or permissions are inadvertently changed, for example, through accidental misuse of the chown or chmod commands, it is possible to revert these to their values as stored in the database. 1. To re-set ownership and permissions for all packages on the system: root@ubuntu12:~# rpm --setperms -a root@ubuntu12:~# rpm --setugids -a 2. To re-set ownership and permissions for a specific package on the system root@ubuntu12:~# rpm --setperms root@ubuntu12:~# rpm --setugids ...................OR .............. 1) To reset uids and gids on files and directories : root@ubuntu~:# for u in $(rpm -qa); do rpm --setugids $u; done 2) To permissions on files and directories root@ubuntu12:~# for p in $(rpm -qa); do rpm --setperms $p; done
Posted on: Thu, 15 May 2014 07:46:55 +0000

Trending Topics



Recently Viewed Topics




© 2015