Koozali.org: home of the SME Server

Obsolete Releases => SME Server 9.x => Topic started by: oldtony on February 21, 2019, 01:33:48 AM

Title: messed up all permissions - Is there a way to fix?
Post by: oldtony on February 21, 2019, 01:33:48 AM
 :sad: I messed up all permissions - Is there a way to fix?
i made a small script as shown here:  chown filepro -fR *; chgrp filepro -fR ; chmod  -fR 755 * 
Above works great if i was below the main filepro directory  ==>> /appl
but i was at / directory in error.   Yes very very bad.  Any suggestions on what i could do to fix all permissions?

Thank You - Old Tony
Thanks for the help - the below worked great after i reset the password using the below below - Thanks

for f in $(rpm -qa); do echo $f; rpm --setugids $f; done
for f in $(rpm -qa); do echo $f; rpm --setperms $f; done


   1. Boot your server and use the arrow keys to select the kernel you would like to boot into.
   2. Press A , to append parameters to your grub boot settings.
   3. Be carefull not to change anything, only add the following:
      Code:
       single
      (Mind you there is a space before single).
   4. Press enter. you will be presented with a prompt.
   5. At this prompt type the following commands (followed by a return). You will be asked to provide a new password. Reset both your root and you admin password and set them to the same value:
      Code:
      passwd root
      Code:
      passwd admin
      .
   6. Reboot your server and everything should be okay now.

Title: Re: messed up all permissions - Is there a way to fix?
Post by: mmccarn on February 21, 2019, 05:36:25 AM
https://wiki.contribs.org/Useful_Commands#Restore_all_permissions_and_ownership