Broken permissions on file system

Asked by Birdy

I get a very strange behavior when I click on install for any package in the software center --- the popup window to authenticate appears for a few milliseconds, jitters horizontally, and then disappears. Thus, I am unable to authenticate any installation and of course installation is not possible.

I suspect that I have by mistake used chown or chmod (or both) wrongly and somehow the authenticate process has been disturbed; but, I have no idea on how to fix this.

I was able to use Synaptic Package Manager to reinstall the software center; but this had no effect --- still can not install any package given in the software center!

I am a newbie to Ubuntu and would appreciate greatly help on how to return my system to normal!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu yelp Edit question
Assignee:
No assignee Edit question
Solved by:
Birdy
Solved:
Last query:
Last reply:
Revision history for this message
Birdy (vs) said :
#1

I am using Ubuntu 9.10 which was very recently installed. It had been working fine until yesterday. The following are some of the commands that I executed from my terminal session that may have caused the problem:

chmod a+rw ~
chmod a+rw ~ -R
chgrp virgil ~ -R
chgrp virgil /usr -R
chown virgil /usr -R

and after this I was unable to execute: sudo su
Then I used the recovery mode in booting, went to the root and entered the following:

chown root:root /usr/bin/sudo
chmod 4111 /usr/bin/sudo

rebooted, and was then able to use sudo.

But, now I still have this problem with the Ubuntu software center.

Revision history for this message
Birdy (vs) said :
#2

Interestingly, when testing the installation of software packages in Ubuntu software center further, sometimes the popup for authentication is stable (does not disappear); but, no matter what button I push on (Cancel or Authenticate) nothing happens --- seems to freeze up.

Hope this is helpful for solving this problem.

Revision history for this message
Michael Lustfield (michaellustfield) said :
#3

You changed the owner of your entire /usr directory. That's very bad.

If you can backup your data and do a fresh install - that would be best. I have no idea why you did that.

If you can't reinstall or don't want to - then boot into the recovery mode and drop to a root shell. Run this command:

chown -R root:root -R /usr
chmod -R 644 ~
find ~ -type d -exec chmod 700 {} \;

That should restore most everything back to where it should be.

Revision history for this message
Birdy (vs) said :
#4

Michael, I am not sure how to reinstall and still be able to recover what my current system without this problem, so I tried to second alternative.

When I tried

 chown -R root:root -R /usr

this did not work --- no permission.

I then tried:

 sudo su
 chown -R root:root -R /usr
 chmod -R 644 ~
 find ~type d -exec chmod 700 { } \;

and no messages were generated and I assume no errors.

Unfortunately, things are now worse! I am unable to execute

  Administration -> Synaptic program manager
  Administration -> Software sources

When I try these, a "busy icon" appears then disappears after a few seconds. Also, if I try

  sudo su
I get the following:

 sudo: must be setuid root

Revision history for this message
Michael Lustfield (michaellustfield) said :
#5

Did you change the permissions levels inside /usr too?

Can you do "ls -laR /usr | gzip -9 > ~/ls_user.txt.gz" and upload the file generated.
Could you also do this and upload the file as well.
ls -laR ~ | gzip -9 > ~/ls_home.txt.gz

This will give us some information about how things are looking right now. It won't give us any private information but will give us a lot of information about permission settings. Please review the second file to ensure there is nothing you consider private in it.

FYI: You should never chown, chgrp, or chmod anything outside of your own home directory. If you were advised by any guide, please let me know of that guide so I can look into it.

Revision history for this message
Michael Lustfield (michaellustfield) said :
#6

marcoba: You are altering questions and affecting the chances of them reaching the needed audience. Please stop this.
1) This issue has nothing to do with a specific package in Ubuntu - stop trying to assign it to one
2) You are intentionally putting words in this users mouth as well as blaming them for what happened.

I have tried to reach you through email but you did not respond. In the future please consider what you are doing and the impact it will have on the community prior to any actions you take.

Revision history for this message
Birdy (vs) said :
#7

On Sat, 2010-02-13 at 06:28 +0000, Michael Lustfield wrote:
> Your question #100728 on Ubuntu changed:
> https://answers.edge.launchpad.net/ubuntu/+question/100728
>
> Michael Lustfield posted a new comment:
> marcoba: You are altering questions and affecting the chances of them reaching the needed audience. Please stop this.
> 1) This issue has nothing to do with a specific package in Ubuntu - stop trying to assign it to one
> 2) You are intentionally putting words in this users mouth as well as blaming them for what happened.
I certainly did not intend to cause any problems. I did read the rules
and thought that I was following them. I am very sorry about that.

I appreciate any help that I have gotten, and had not intent of blaming
others for my problems.

--V. Stokes
>
> I have tried to reach you through email but you did not respond. In the
> future please consider what you are doing and the impact it will have on
> the community prior to any actions you take.
>

Revision history for this message
Birdy (vs) said :
#8

On Sat, 2010-02-13 at 06:28 +0000, Michael Lustfield wrote:
> Your question #100728 on Ubuntu changed:
> https://answers.edge.launchpad.net/ubuntu/+question/100728
>
> Michael Lustfield posted a new comment:
> marcoba: You are altering questions and affecting the chances of them reaching the needed audience. Please stop this.
> 1) This issue has nothing to do with a specific package in Ubuntu - stop trying to assign it to one
> 2) You are intentionally putting words in this users mouth as well as blaming them for what happened.
>
> I have tried to reach you through email but you did not respond. In the
> future please consider what you are doing and the impact it will have on
> the community prior to any actions you take.
>
I have now done a complete reinstallation, and after an all-night
session, things seem to be ok.

--V

Revision history for this message
Michael Lustfield (michaellustfield) said :
#9

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You didn't cause any problems. That was directed at marcoba, not you.

If you were advised to make those changes by any guide or person, could
you please let us know where or who from? The changes made were
dangerous to your system.

I'm glad this is working for you now.

On Sat, 13 Feb 2010 13:00:41 -0000
Birdy <email address hidden> wrote:

> Question #100728 on yelp in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/yelp/+question/100728
>
> Birdy gave more information on the question:
> On Sat, 2010-02-13 at 06:28 +0000, Michael Lustfield wrote:
> > Your question #100728 on Ubuntu changed:
> > https://answers.edge.launchpad.net/ubuntu/+question/100728
> >
> > Michael Lustfield posted a new comment:
> > marcoba: You are altering questions and affecting the chances of them reaching the needed audience. Please stop this.
> > 1) This issue has nothing to do with a specific package in Ubuntu - stop trying to assign it to one
> > 2) You are intentionally putting words in this users mouth as well as blaming them for what happened.
> >
> > I have tried to reach you through email but you did not respond. In the
> > future please consider what you are doing and the impact it will have on
> > the community prior to any actions you take.
> >
> I have now done a complete reinstallation, and after an all-night
> session, things seem to be ok.
>
> --V
>

- --
Michael Lustfield
Kalliki Software

Network and Systems Administrator
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkt2wAIACgkQ3y7Nst6YLGVJXQCfYn2mtPgVFOl8GF2iyeLp1LdN
dG4AoJngEgjVSvGuJAfBqLyY0i7+Y2Jd
=Qs4i
-----END PGP SIGNATURE-----

Revision history for this message
Birdy (vs) said :
#10

Hello Michael,
First, let me say, that I take full responsibility for the problem with my system --- it was my own stupidity, and eagerness to fix things. READ THE HELPS AND MANUALS FIRST!! I know this; but, sometimes I forget.

Second, one of the things that I like very much about Ubuntu is the many forums and help that one can get from the Ubuntu community --- quite different from Microsoft systems.

Third, I reinstalled my system from scratch (I believe that this was your first suggestion Michael), and I now have it back, and even better than it was before! I do have one little problem, that I find very irritating --- I am trying to solve it without any outside help. I learned a lot from the stupid mistakes I made, and the subsequent reinstallation.

Finally, keep up the good work. Your help is always appreciated!

--V :-)