PDA

View Full Version : Linux not boot - Chmod - No execute permissions


anarchy3200
12-18-2006, 11:43 PM
Hi,

Ok i know just how stupid this is but after quite a major mistake with wildcards i managed to chmod my whole linux drive to 644 which means that on boot none of the files have execute permissions, therefore system dies on boot.

Does anyone know of a way to run a chmod ( to fix this ) with root permissions without having to boot into linux ( as i can't! )

Thanks!

FYI:
Linux: SUSE 10.1

Spookster
12-18-2006, 11:52 PM
Well I don't know about Suse as I use Fedora but you should hopefully be able to use the install CD to boot up and maybe they have a rescue mode option like Fedora or at least allow you to boot into command line only so you can log into root and chmod things back. Honestly though with what you have done your system will likely not run properly or be as secure as it was because there are different permissions for different files/directories so you can't just chmod everything back to what it was. I would just back up your necessary files at this point and reinstall.

anarchy3200
12-19-2006, 12:07 AM
Yeh i am tempted to start again but thought i might aswell ask.

Re: Rescue Console, i did try that but because its single user mode it only gives read only permissions to all the root folders therefore cant change permissions on them. Thanks for the idea though.

oracleguy
12-19-2006, 02:45 AM
You can use any sort of linux live cd like knoppix to go in and change the permissions. But as Spookster pointed out, its going to be a much better idea to re-install fresh.

You don't use an account with root privileges as your day-to-day user account do you?

anarchy3200
12-19-2006, 07:03 PM
I did try an xubuntu live cd that i had lying around but i couldn't get it to mount the drive, might download knoppix and give that a go.

Re. the root account, no i don't, i'd just su'd into it to change the permissions on one folder and apparently forgot to change directory into it so the chmod ran on everything rather than just inside the folder... Might not have been one of my cleverer moments :confused:

slushy77
12-31-2006, 05:19 PM
ubuntu live cd's mount hard drives as read only - its a safety feature to prevent data loss/corruption.

su is a very dangerous command and should be used with great caution, sudo is far safer as is it does one command as root then returns to normal user mode. its syntax is sudo <command> and it should ask for a password before doing the task.

the beauty of sudo is that it will operate in the current directory :thumbsup: , su can operate in '/' :mad:

good luck with your restoration process, at least you've still got your data. It could have been worse, imagine what rm -rf * would have done

Cheeseboy
12-31-2006, 09:34 PM
Knoppix live cd always got me out of a sticky situation.:thumbsup: