Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
recovery of original file permissions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
bahadir
Tux's lil' helper
Tux's lil' helper


Joined: 02 Aug 2004
Posts: 81

PostPosted: Wed Nov 17, 2004 6:52 pm    Post subject: recovery of original file permissions Reply with quote

I messed up the file permissions on /usr by typing

chown -R user:users /usr/*

where I was meant to do it for a subdirectory of /usr

I realised it and stopped the action but some of my permissions were messed up already.

Any suggestions on how to restore them?

What would be the most hassle-free way to reinstall, apart from doing it from scratch?

Thanks,
Bahadir
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1336
Location: Sweating in South Florida

PostPosted: Wed Nov 17, 2004 7:14 pm    Post subject: Reply with quote

Ouch!

I don't know of any tools that would allow you to restore file permissions, but what you could do is post a breif list of what you have installed, then find somebody who has a similar setup and have them give you the output of:

ls -lRa /usr/

Once you have their output, you could easily write a script to correct the permissions. Of course it won't be 100%, as far as i know, the only way to make sure you have all of the permissions corrected would be a reinstall.
_________________
When harmonious relationships dissolve
Then respect and devotion arise;
When a nation falls to chaos
Then loyalty and patriotism are born.
-Lao Tse
Back to top
View user's profile Send private message
bakreule
Apprentice
Apprentice


Joined: 27 Aug 2003
Posts: 233
Location: Paris, France

PostPosted: Wed Nov 17, 2004 7:16 pm    Post subject: Reply with quote

I hate to be the bringer of bad news, but you've pretty much hosed yourself. There's no way of getting back your old permissions without a lot of hard work. If you don't want to reinstall, you could just set everything in /usr to

-rw-r--r-- root:root

and then see what breaks, but that's just a pain in the ass. Your best bet is to reinstall..... sorry
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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