LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   /usr/ permissions all screwed up! (https://www.linuxquestions.org/questions/linux-security-4/usr-permissions-all-screwed-up-249226/)

ptafflogic 10-30-2004 04:44 PM

/usr/ permissions all screwed up!
 
Hi all. After changing the permissions in /usr (yes, with -R! DOH!!!) and trying setting them up again as they were, strange things are now happening every time I run apps that require setuid root (i.e. drakconf, gurpmi, firestarter, etc.) as a regular user. Those apps won't run at all, saying that I don't have the required permissions. My question is: is there a command other than chmod or complete reinstallation that can completely reset to defaults the permissions in /usr and all its subdirs ?

Any help is appreciated

trickykid 10-30-2004 06:09 PM

We all wish there was such a command to reset to defaults.

You could probably get started by or in which most of the applications or directories right underneath /usr are all owned by root and are rwxr-xr-x for thier permissions except the /usr/bin and /usr/sbin directories which are owned by root and group owned by bin, with the same permissions.
Any links within /usr are usually rwxrwxrwx and owned by root.

That should get you started and it should mostly be the same throughout, etc.

neilman 10-31-2004 07:25 AM

Did you do a chmod -R or a chown -R? If you're just complete goathumped, AND this is a box that you only run on your own (i.e. you don't have an entire network of people running amok) I would do:

cd /
chown -R root:root /usr
chmod -R 755 /usr


Almost all of the files under /usr are owned by root. Some are root:bin (i.e. /usr/bin). As well, almost all of the permissions are set to 755 (rwxr-xr-x) -- with some being 444 (r--r--r--), but again, if this is an isolated box that you don't have a bunch of other people logging in to, then having more relaxed file security settings just to get things working again should be fine.

ptafflogic 10-31-2004 11:15 AM

/usr permissions all screwed up!
 
OK. Thx everybody for your kind advice, but I managed to reinstall linux on my box after making a dump/restore of my /home, so I didn't have to reconfigure kde and stuff...

everything is working just fine now.

unSpawn 10-31-2004 03:28 PM

We all wish there was such a command to reset to defaults.
You mean like "rpm --setperms -qa"... If you got Aide spose you can do: "zcat aide.db|egrep -ve "^(#|@)"|while read l; do l=( ${l} ); chmod ${l[2]} ${l[0]}; chown ${l[4]}:${l[5]} ${l[0]}; done". If db not gzipped use "cat".


All times are GMT -5. The time now is 06:59 AM.