I changed the permission of root recursively all 777..... how to recover now??
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I changed the permission of root recursively all 777..... how to recover now??
Hello Sir
I am a naive to linux.
I have fedora 7 installed with windows Xp on same machine.
While i was installing one software i got the prompt of Operation not permitted even when i was in root. So i changed the permission of root
recursively to 777.(chmod / -Rf 777 , like that)
So when i restarted the next time many errors came up while starting various services. Then the console of my laptop went very black popping up lots of error dialogue boxes. Then i used the shell mode to change root recursively 742. Now when i restarted it is unable to boot.
Sorry i have just very less idea of Linux .
Can any body help me . How can i recover back. Or atleast how can i
recover my few important files i had made in linux and may be then i reinstall. Due to some important data i dont want to install newly also.
Having a mature package management system this ain't no problem. Boot your installation CD in rescue mode, then try 'rpm --root /mnt/rescue -qa |xargs -iX rpm --root /mnt/rescue --setperms 'X''. And FCOL don't fsck with chmod *twice* if you fscked it up the first time. In your case I'd suggest you read first, then think, then decide to read again.
I think that one of the packages created the basic filesystem, and if so, it should have a name similar to filesystem. Let's find out the package that created /usr/bin/.
unSpawn: You beat me to the punch and had a better answer. I had to look up what FCOL meant. I don't believe I didn't know that acronym. My Grandpa would yell that all the time. ( not always at me! ).
when i tried to boot with installation cd in rescue disk it asks me
to make an image of existing file system in /mnt/sysimage. But i skipped
it to shell mode. Then as u said i did rpm -qf /usr/bin , but it says
file /usr/bin is not owned by any package . Moreover it is unable to su
also , saying root does not exist.
Also when i booted normally without CD then i got the following thing:
warning: can't aces (null)
exec of init ((null)) failed !! : Bad Address
Kernel panc - not syncing : Attempted to kill init !
Moreover sir as i got windows XP on he same machine which i have been using
by mounting it in /mnt/windows , so can't i just copy my few important files in windows .
Now what to do ??
What do u mean by FCOL and fsck ???
Also when i booted normally without CD then i got the following thing:
warning: can't aces (null)
exec of init ((null)) failed !! : Bad Address
Kernel panc - not syncing : Attempted to kill init !
Moreover sir as i got windows XP on he same machine which i have been using by mounting it in /mnt/windows , so can't i just copy my few important files in windows . If so how to do.
I don't consider LQ a race of sorts and my answer certainly not as "better". It may be concise but your explanation is much better for new users to understand.
Quote:
Originally Posted by jschiwal
I had to look up what FCOL meant. I don't believe I didn't know that acronym. My Grandpa would yell that all the time. ( not always at me! ).
Heh. Well at least you've got vivid memories of him :-]
I think it means you copied in the outer quotes, which you should not, since they are only used to denote the command.
Note that you can not execute that until you have mounted your installation. Just to be sure, before you execute anything check if the directory /mnt/sysimage/var/lib/rpm exists. Now use (I've added the dbpath just in case):
Based on the original question it appears to me that the system has not been in use for long.
I would rather backup the /home directory somewhere and re-install everything (a clean install).
Another option would be to re-install without reformatting - that will overwrite the base system, but leave the home directories and log files in /var intact - in this scenario files are overwritten, but never deleted. Some minor problems could happen with configuration files in the user's home directory, but the /var logfiles will be deleted sooner or later anyway by the system or overwrtitten.
Other mentioned possibilities are probably too difficult for a new user.
As a new user one should rather avoid doing regular things as root, keep important data in one place and do regular backups. And be prepared to re-install a few times before you get used to the system.
Based on the original question it appears to me that the system has not been in use for long.
I would rather backup the /home directory somewhere and re-install everything (a clean install).
Another option would be to re-install without reformatting - that will overwrite the base system, but leave the home directories and log files in /var intact - in this scenario files are overwritten, but never deleted. Some minor problems could happen with configuration files in the user's home directory, but the /var logfiles will be deleted sooner or later anyway by the system or overwrtitten.
I'll 2nd this option. I would find a way to save the important data on another system and then reinstall. Might be a good excuse to pick you up a 16gig thumb drive to save your data to before you do the reinstall. (always a silver lining if you look hard enough. )
I don't consider LQ a race of sorts and my answer certainly not as "better". It may be concise but your explanation is much better for new users to understand.
Heh. Well at least you've got vivid memories of him :-]
You posted your message as I was typing mine.
Using "rpm -V" on individual packages and manually fixing permissions would have been a lot more work, but perhaps it would have a deterrent effect. A lot like writing "I will not use chmod / -Rf" a thousand times on a blackboard!
Which reminds me of a three year old who watched her Daddy install linux on his desktop. The next day at kindergarten, she had reparitioned all of the day care center's computers! She is banned from even touching the computers now.
Which reminds me of a three year old who watched her Daddy install linux on his desktop. The next day at kindergarten, she had reparitioned all of the day care center's computers! She is banned from even touching the computers now.
I'm sorry to see your offspring being stigmatised. Must be hard for a budding hacker to start her carreer like that. Maybe it builds character :-]
I'll 2nd this option. I would find a way to save the important data on another system and then reinstall.
I am somewhat puzzled by that comment. What would be a sane reason to do any backup and then leaving the backup file on the same system that will be re-installed and propably also re-formatted?
Backing up 'somewhere' is not very specific, I admit, but 'somewhere' can be anything from a flash drive to an external drive, some storage place on the Internet or a simple floppy if your data fits on it, or your favorite 16gig thumb drive or whatever makes sense to you and is available.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.