View previous topic :: View next topic |
Author |
Message |
Orific n00b
Joined: 14 Oct 2005 Posts: 67
|
Posted: Sun Aug 20, 2006 7:38 am Post subject: restoring rights and ownerships [solved] |
|
|
Lately, my hard disk getting a little old, it was more and more generating errors, and it resulted in the filesystem (ext3) switching to read-only more and more frequently, forcing me not only to reboot, but also to do an fsck manually each time .
So, a little exasperated, I decided to reformat the gentoo partition (I hope it will make things better). I copied all the files to an external disk, formated, and copied the files back to the partition... Only I forgot all the rights and ownerships matters, and did not use the -p option for cp .
It doesn't seem to be very problematic for the moment: emerge was able to restore the ownerships for portage to run quite normally; I can login as a normal user and do various things without problems. But for example, su does not work, and I had to restore the sticky bit on /bin/ping to be able to ping as user. To restore the normal behaviour and avoid further complications, I think I have to restore the rights and ownerships for the main system files.
Does anybody know how/where I can find the normal values ? Is there a mean to do that in an automated way ? In a word: what is the best solution ?
Thanks.
Last edited by Orific on Sat Aug 26, 2006 2:27 am; edited 1 time in total |
|
Back to top |
|
|
Orific n00b
Joined: 14 Oct 2005 Posts: 67
|
Posted: Sun Aug 20, 2006 8:18 am Post subject: Re: restoring rights and ownerships |
|
|
Orific wrote: | for example, su does not work, and I had to restore the sticky bit on /bin/ping to be able to ping as user. |
After some reflexion , it occured to me that it could have been the same problem. So I put the sticky bit on su too, and mount (also not usable as a normal user). I suppose (hope...) it is the right solution. |
|
Back to top |
|
|
Orific n00b
Joined: 14 Oct 2005 Posts: 67
|
Posted: Wed Aug 23, 2006 8:37 am Post subject: |
|
|
*bump*
|
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Wed Aug 23, 2006 12:22 pm Post subject: |
|
|
Did you try reemerging shadow?
Code: | # equery belongs /bin/su
[ Searching for file(s) /bin/su in *... ]
sys-apps/shadow-4.0.15-r2 (/bin/su) |
_________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
|
Orific n00b
Joined: 14 Oct 2005 Posts: 67
|
Posted: Wed Aug 23, 2006 10:41 pm Post subject: |
|
|
drescherjm wrote: | Did you try reemerging shadow?
Code: | # equery belongs /bin/su
[ Searching for file(s) /bin/su in *... ]
sys-apps/shadow-4.0.15-r2 (/bin/su) |
|
Thank you for your answer.
I did it and it yields:
Code: | -rws--x--x 1 root root 25420 Aug 21 22:27 /bin/su |
which is what I had set. So for su it is OK.
But I am worried about other possible problems that could happen, related to other system files.
Maybe I am worrying for nothing, but I prefer to be sure. |
|
Back to top |
|
|
voidzero Bodhisattva
Joined: 21 Jul 2002 Posts: 265 Location: Grnn
|
Posted: Thu Aug 24, 2006 11:01 am Post subject: Re: restoring rights and ownerships |
|
|
How would you feel about re-emerging everything?
emerge -eaDv --oneshot world _________________ Diplomacy is the art of letting the other party have things your way.
-- Daniele Vare |
|
Back to top |
|
|
Orific n00b
Joined: 14 Oct 2005 Posts: 67
|
Posted: Sat Aug 26, 2006 2:26 am Post subject: Re: restoring rights and ownerships |
|
|
voidzero wrote: | How would you feel about re-emerging everything?
emerge -eaDv --oneshot world |
Thank you for your answer.
I also did it, although I was trying to avoid it since it takes for ever.
However it did not fix everything: for example I was not able to use exim because of bad rights on the log file.
But well I guess I have no other choice than wait and solve the problems as they come .
I put "solved" in the post title. |
|
Back to top |
|
|
|