LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 10-30-2004, 04:44 PM   #1
ptafflogic
LQ Newbie
 
Registered: Apr 2004
Location: Canada
Distribution: Mandrake 10.0 Community
Posts: 3

Rep: Reputation: 0
/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
 
Old 10-30-2004, 06:09 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
Old 10-31-2004, 07:25 AM   #3
neilman
Member
 
Registered: Oct 2004
Location: Northville, MI
Distribution: Slackware
Posts: 65

Rep: Reputation: 15
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.
 
Old 10-31-2004, 11:15 AM   #4
ptafflogic
LQ Newbie
 
Registered: Apr 2004
Location: Canada
Distribution: Mandrake 10.0 Community
Posts: 3

Original Poster
Rep: Reputation: 0
/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.
 
Old 10-31-2004, 03:28 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/local/firefox permissions rose_bud4201 Linux - Software 2 05-18-2005 10:08 PM
Permissions & Ownership Really screwed slacard Other *NIX 1 04-03-2005 12:36 AM
File permissions and ownership all screwed up Haiyadragon Linux - General 6 09-20-2004 01:09 PM
Mdk 10.0 permissions for /usr rifffrafff Mandriva 3 07-21-2004 09:47 AM
good permissions for /usr/src durden2.0 Linux - Newbie 4 03-19-2004 05:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration