Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ?
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.
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.
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...
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".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.