Ask Your Question
0

Linux doesn't boot after changing permissions to 755 of all folder in \

asked 2013-01-31 02:07:09 -0600

Rohit gravatar image

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 :`(

edit retag flag offensive close merge delete

Comments

I agree with anishjp (should consider posting that as an answer rather then a comment). I have seen one person manually recover from this command, but it takes more time then re-installing (by far) and is less reliable.

bodhi.zazen gravatar imagebodhi.zazen ( 2013-01-31 10:15:43 -0600 )edit

Rohit, you should post another question regarding what you were actually trying to accomplish when you made these changes - perhaps we can help you prevent further damage :-)

randomuser gravatar imagerandomuser ( 2013-02-03 00:33:15 -0600 )edit

Rohit, you should post another question regarding what you were actually trying to accomplish when you made these changes - perhaps we can help you prevent further damage :-)

randomuser gravatar imagerandomuser ( 2013-02-03 00:33:17 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-02-01 06:07:35 -0600

Rohit gravatar image

This is a fix I got from another source at linux forums. Thought posting it would help others in the same peril.

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 )

type in the following and then hit "enter", wait till it is done

Code: for p in $(rpm -qa); do rpm --setperms $p; done

then the following script

Code: for p in $(rpm -qa); do rpm --setugids $p; 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 "

follow the "fix" at the bottom of the error massages , you might have a more than just a few errors

As Fedora 16 expires in about two weeks, try installing Fedora 18

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-01-31 02:07:09 -0600

Seen: 1,473 times

Last updated: Feb 01 '13