Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
restoring rights and ownerships [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Orific
n00b
n00b


Joined: 14 Oct 2005
Posts: 67

PostPosted: Sun Aug 20, 2006 7:38 am    Post subject: restoring rights and ownerships [solved] Reply with quote

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 :evil: .
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 :oops: .
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
View user's profile Send private message
Orific
n00b
n00b


Joined: 14 Oct 2005
Posts: 67

PostPosted: Sun Aug 20, 2006 8:18 am    Post subject: Re: restoring rights and ownerships Reply with quote

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 :lol: , 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
View user's profile Send private message
Orific
n00b
n00b


Joined: 14 Oct 2005
Posts: 67

PostPosted: Wed Aug 23, 2006 8:37 am    Post subject: Reply with quote

*bump*

:D
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Wed Aug 23, 2006 12:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
Orific
n00b
n00b


Joined: 14 Oct 2005
Posts: 67

PostPosted: Wed Aug 23, 2006 10:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
voidzero
Bodhisattva
Bodhisattva


Joined: 21 Jul 2002
Posts: 265
Location: Grnn

PostPosted: Thu Aug 24, 2006 11:01 am    Post subject: Re: restoring rights and ownerships Reply with quote

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
View user's profile Send private message
Orific
n00b
n00b


Joined: 14 Oct 2005
Posts: 67

PostPosted: Sat Aug 26, 2006 2:26 am    Post subject: Re: restoring rights and ownerships Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum