LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 05-26-2005, 09:13 PM   #1
microsoft/linux
Senior Member
 
Registered: May 2004
Location: Sebec, ME, USA
Distribution: Debian Etch, Windows XP Home, FreeBSD
Posts: 1,445
Blog Entries: 9

Rep: Reputation: 45
resetting permissions on everything?


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
Code:
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

Code:
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?
 
Old 05-27-2005, 04:05 AM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
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.
 
Old 05-27-2005, 08:13 AM   #3
microsoft/linux
Senior Member
 
Registered: May 2004
Location: Sebec, ME, USA
Distribution: Debian Etch, Windows XP Home, FreeBSD
Posts: 1,445
Blog Entries: 9

Original Poster
Rep: Reputation: 45
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?
 
Old 05-29-2005, 04:44 PM   #4
microsoft/linux
Senior Member
 
Registered: May 2004
Location: Sebec, ME, USA
Distribution: Debian Etch, Windows XP Home, FreeBSD
Posts: 1,445
Blog Entries: 9

Original Poster
Rep: Reputation: 45
Is there any way to completely redownload and install all of the packages from my current system? I don't really want to wipe my partition out and reinstall.
 
Old 05-30-2005, 07:56 PM   #5
microsoft/linux
Senior Member
 
Registered: May 2004
Location: Sebec, ME, USA
Distribution: Debian Etch, Windows XP Home, FreeBSD
Posts: 1,445
Blog Entries: 9

Original Poster
Rep: Reputation: 45
will doing this
Code:
dpkg --get-selections | awk '$2 == "install" { print $1 }' | xargs apt-get -y --reinstall install
reset all the permissions?
 
Old 05-31-2005, 04:01 PM   #6
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
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.
 
Old 05-31-2005, 08:18 PM   #7
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
That's what I thought.

Not that I am terribly happy to be right in this situation, a reinstall can be a real joy kill.

But don't worry about it, it is part of the learning curve. I can't tell you how many times I had to reinstall the first year I started using GNU/Linux.

Last edited by MS3FGX; 05-31-2005 at 08:20 PM.
 
Old 05-31-2005, 09:58 PM   #8
microsoft/linux
Senior Member
 
Registered: May 2004
Location: Sebec, ME, USA
Distribution: Debian Etch, Windows XP Home, FreeBSD
Posts: 1,445
Blog Entries: 9

Original Poster
Rep: Reputation: 45
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/dev/nvdia* permissions keep resetting on reboot Lagg Slackware 7 05-13-2005 05:04 PM
Permissions resetting brinkster Mandriva 1 12-06-2004 07:54 AM
samba share permissions keep resetting Red Squirrel Linux - Newbie 0 03-03-2004 09:55 PM
Permissions keep resetting for directory HiRoll3r Linux - Newbie 3 05-19-2003 12:08 PM
help with resetting partitions bison42 Linux - Newbie 2 04-01-2002 06:39 PM


All times are GMT -5. The time now is 05:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration