LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux Fedora16 doesn't boot after changing permissions to 755 of all folders in \ (https://www.linuxquestions.org/questions/linux-newbie-8/linux-fedora16-doesnt-boot-after-changing-permissions-to-755-of-all-folders-in-%5C-4175447950/)

sreeraj2388 01-31-2013 02:15 AM

Linux Fedora16 doesn't boot after changing permissions to 755 of all folders in \
 
I made a terrible mistake and now my whole Linux doesn't boot. I changed the permissions of all folders in the root i.e. \

I used

find \ -type d -exec 755 {} \;

find \ -type f -exec 755 {} \;

Now I cant even boot my linux. Disk error is being displayed after waiting a long time watching linux load.

If you ask me why I changed the permissions, I thought changing permission of the entire directory would solve everything than being prompted to login as root each time. This I found to be a blunder.

I am able to boot either into windows (or) open the grub terminal only as of now. I checked the properties of my present linux fedora 16, it is as root(hd2,msdos2) /bin/usr/bin/grub2 has all the files needed for linux to boot.

I have no idea how to get in, I tried chmod and chown at grub terminal but command not found is displayed.

I need to fix it asap

John VV 01-31-2013 03:06 AM

unfortunately it will be quicker to reinstall

fedora checks the permissions on files and folders , if they are not right it will not allow the system to boot .

this is a safety and security precaution to prevent a "rootkit" from turning your machine into a "zombie" .


Quote:

would solve everything than being prompted to login as root each time
having the root gui login disabled is also a safety and security precaution.

the pop up to type in the root password is also a safety and security precaution.

you run as a normal user then IF AND ONLY IF you NEED root permission you use "su" or "su -" or a pop-up pops up .



you can try a fix

Use the install dvd to boot into "rescue mode"
-- the instructions are on the screen if you boot with the dvd in the computer
just fallow them

then after you run this command ( the last step in booting in rescue)
" chroot /dev/sysimage " ( you are prompted to do that from the on screen directions )

wright down ON PAPER -- you will need paper
-- the below two are shell scripts
Code:

for p in $(rpm -qa); do rpm --setperms $p; done
--- then run this shell script
for p in $(rpm -qa); do rpm --setugids $p; done

type in the first then hit "enter" and wait till it is done
then type in the second one hit "enter "and wait till it is done
that should reset MOST THINGS but NOT ALL

your home folder will not fully be reset
you will need to make a new user and delete the old user account

even then you might have some SELinux issues
a yellow star will pop up
that is "SELinuxTroubleShooter "
fallow the "fix" at the bottom of the error massages , you might have a more than just a few errors


Are you aware that fedora 16 is about to hit it's End Of Life (in 12 days )

you might want to install fedora 18

sreeraj2388 02-01-2013 06:11 AM

Thank you so much for the tip and code JOHN VV.
I think I will try this and then later upgrade to Fedora 18 in a week.


For the newbies, the following might help for data back-up.
We can login to the shell terminal with
ctrl + alt + (F1 / F3 / F4 / F6/ F8/ F10)
This can be helpful to backup the data over LAN on other computers or your server


All times are GMT -5. The time now is 02:21 PM.