DebianThis forum is for the discussion of Debian Linux.
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.
Somehow, I messed up the permissions on a bunch of stuff on my system. I booted a couple of days ago, and was getting errors about ssh, and sudoers. So I changed those permissions, and then noticed, a bunch of other ones were wrong(include /etc/passwd and /etc/shadow). So I did a
cd /; chmod g-w . chmod o-w .
and that seemed to fix it. Then I rebooted, and the X server wouldn't start. I was able to start kdm, but kde wouldn't start. So I reversed the process
cd /; chmod g+w . chmod o+w .
and that seemed to fix it temporarily. Is there any way to reset the default permissions on everything? I'd rather not reinstall. Thoughts?
As far as I know, setting the permissions on the entire file system is a game breaker.
The problem is, there is no "default" setting. Every file should have it's own permissions and ownership to maintain system security and stability.
So you can't just run a command to set everything back to the way it was before, since there is no way of knowing what that was.
I would have to say a reinstall is probably the most likely end to this story. Maybe somebody with more experience with this could give you a better direction to go down, but it seems like the amount of leg work it would take to track down all the different binaries and system files and give them the proper ownership and permissions would take a hell of a lot longer than just backing up your data and doing a fresh install.
there's no real data on it, it's mainly a toy machine right now. I don't have anything on it that's overly important. At this point I'm still uncomfortable with swtiching entirely from Windows to Linux. I don't want to reinstall. I just did that because my fs went beserk. Other people? Any Gurus have any experiance in this?
There is no way to undo or reset permissions to a previous value, because the previous value is not stored anywhere. As you have seen, setting permissions should not be taken lightly, and should only be done on individual files/directories when it is specifically needed.
Realistically the only safe and "guaranteed to work" option you have is to reinstall. To be honest there's no telling what the state of your system is right now, which unfortunately means that it cannot be considered secure, which means that the only sensible thing to do is wipe the disk and start over. You mentioned that this is a toy machine, so although doing a reinstall is somewhat of a hassle, it doesn't sound like you need to be concerned about losing any data. Good luck with it -- J.W.
I don't know what happened to the permissions. I'll see if I can deal w/ it right now. Then, when sarge goes stable(hopefully w/in the next week) I'll get a CD set, and reinstall, then wait till next school year to update. Thanks