LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-27-2004, 06:41 PM   #1
hexadevil
LQ Newbie
 
Registered: May 2004
Posts: 9

Rep: Reputation: 0
Problems with system-wide file permissions


OK ppl, heres my deal.

I have a machine at work running Gentoo 2004.0

Only 2 ppl use it, myself, and another employee (more newbie-ish)

The problem is, he was tinkering with chmod and chown trying to get access to the root directory so he could go anywhere he wanted on the drive while in his account (he has root access)

So to make a long story short, he used chown to add his user to all directories, which messed everything up, and then tried to revert it back by doing
#root> chown -R root /

Now, both of our accounts cant load X because it says it cant copy over the X log files, which means it no longer has permission.

I'm not sure what he did with chmod, but X craps out and says it cant load because it has to be logged in as root (meaning X itself)

so my question is,
Is there a way to set all permissions back to default?
Keep in mind, reinstalling isnt an option (its Gentoo, it takes FOREVER)

Once I figure this out I'm gonna strangle him with my mouse cable...
 
Old 05-27-2004, 06:59 PM   #2
DB03
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1
Posts: 48

Rep: Reputation: 15
I'm a n00b too, but i uh... have experience with this suject... look @ sig. lol. I went in as root and gave everyone all permissions... totally messed everything up. I was using Fedora Core 1 but it looks like you have the same problem. I asked on here and a mod told me that i might be able to fix it using chmod from the recovery console but it would probably be easier to reinstall. here's the link to my thread:

I broke Linux! Help!!

The only other thing i can help you with is telling you that I tried what he suggested in the recovery console; it didn't work.

sorry,

db03

ps. good luck
 
Old 05-30-2004, 08:54 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
While my system is Mandrake, some of these may be standard. I used the pattern:
ls -lR * | grep -v 'root root' | grep -v 'root root' | grep -v 'root root'
Hope it helps. The /usr directory is a killer!

In the /usr directory
Code:
share/pvm3:
-rwxr-xr-x  1 root pvm   129 Feb 26 19:47 genpubkey*
-rwxr-xr-x  1 root pvm  1491 Feb 26 19:47 pvm*
-rw-r--r--  1 root pvm     0 Feb 26 19:47 pvmhosts
-rwxr-xr-x  1 root pvm   333 Feb 26 19:47 sendPublicKeyToHosts*

share/pvm3/conf:
-rw-r--r--  1 root pvm 591 Feb 26 19:47 LINUX.def

share/pvm3/lib:
-rwxr-xr-x  1 root pvm   559 Feb 26 19:47 debugger*
-rwxr-xr-x  1 root pvm  1582 Feb 26 19:47 debugger2*
-rwxr-xr-x  1 root pvm  2388 Feb 26 19:47 pvmd*
-rwxr-xr-x  1 root pvm  6861 Feb 26 19:47 pvmgetarch*
-rwxr-xr-x  1 root pvm   347 Feb 26 19:47 pvmtmparch*

share/pvm3/lib/LINUX:
-rwxr-xr-x  1 root pvm 288888 Feb 26 19:47 pvm*
-rwxr-xr-x  1 root pvm 156984 Feb 26 19:47 pvmd3*
-rwxr-xr-x  1 root pvm 151096 Feb 26 19:47 pvmgs*


share/samba/scripts:
-rwxr-x---  1 root adm   4367 Mar  1 16:08 smbldap-groupadd.pl*
-rwxr-x---  1 root adm   2324 Mar  1 16:08 smbldap-groupdel.pl*
-rwxr-x---  1 root adm   7869 Mar  1 16:08 smbldap-groupmod.pl*
-rwxr-x---  1 root adm   1884 Mar  1 16:08 smbldap-groupshow.pl*
-rwxr-x---  1 root adm   7168 Mar  1 16:08 smbldap-migrate-accounts.pl*
-rwxr-x---  1 root adm   4974 Mar  1 16:08 smbldap-migrate-groups.pl*
-rwxr-x---  1 root adm   5599 Mar  1 16:08 smbldap-passwd.pl*
-rwxr-x---  1 root adm   8995 Mar  1 16:08 smbldap-populate.pl*
-rwxr-x---  1 root adm  16079 Mar  1 16:08 smbldap-useradd.pl*
-rwxr-x---  1 root adm   2950 Mar  1 16:08 smbldap-userdel.pl*
-rwxr-x---  1 root adm  15085 Mar  1 16:08 smbldap-usermod.pl*
-rwxr-x---  1 root adm   1826 Mar  1 16:08 smbldap-usershow.pl*
-rwxr-x---  1 root adm   5757 Mar  1 16:08 smb-migrate*

/usr/bin:
-rwsr-sr-x  1 root cdwriter  561096 Mar 24 03:08 cdrdao*
-rwsr-sr-x  1 root cdwriter  322604 Apr 27 04:09 cdrecord*
-rwxr-xr-x  1 root cdwriter   20556 Apr 27 04:09 devdump*
-rwxr-xr-x  1 lp   sys        32344 Mar 24 21:18 escputil*
-rwxr-xr-x  1 rpm  rpm          942 Feb 25 07:00 gendiff*
-rwxr-xr-x  1 root cdwriter   18860 Apr 27 04:09 isodebug*
-rwxr-xr-x  1 root cdwriter   26508 Apr 27 04:09 isodump*
-rwxr-xr-x  1 root cdwriter  143788 Apr 27 04:09 isoinfo*
-rwxr-xr-x  1 root cdwriter   26476 Apr 27 04:09 isovfy*
-rwxr-sr-x  1 root nogroup    49740 Mar 25 11:11 kdesud*
-rwxr-sr-x  2 root slocate    27256 Jan 29 07:59 locate*
-rwxr-sr-x  1 root mail       13280 Jul 11  2003 lockfile*
-rwsr-xr-x  1 lp   root        8384 Mar  2 20:40 lppasswd*
-rwxr-sr-x  1 root man        39160 Jan 30 15:06 man*
-rwsr-x---  1 root sys        11200 Mar 24 21:18 ml85p*
-rwxr-sr-x  1 lp   sys       170488 Mar 24 21:18 mtink*
-rwsr-sr-x  1 root mail       72536 Jul 11  2003 procmail*
-rwsr-sr-x  1 root cdwriter  146252 Apr 27 04:09 readcd*
-rwxr-xr-x  1 rpm  rpm        26552 Feb 25 07:00 rpm2cpio*
lrwxrwxrwx  1 rpm  rpm           15 May  7 05:49 rpmbuild -> ../lib/rpm/rpmb*
lrwxrwxrwx  1 rpm  rpm           15 May  7 05:42 rpmdb -> ../lib/rpm/rpmd*
lrwxrwxrwx  1 rpm  rpm           15 May  7 05:42 rpme -> ../lib/rpm/rpme*
lrwxrwxrwx  1 rpm  rpm           15 May  7 05:42 rpmi -> ../lib/rpm/rpmi*
lrwxrwxrwx  1 rpm  rpm           15 May  7 05:42 rpmquery -> ../lib/rpm/rpmq*
lrwxrwxrwx  1 rpm  rpm           15 May  7 05:42 rpmsign -> ../lib/rpm/rpmk*
lrwxrwxrwx  1 rpm  rpm           15 May  7 05:42 rpmu -> ../lib/rpm/rpmu*
lrwxrwxrwx  1 rpm  rpm           15 May  7 05:42 rpmverify -> ../lib/rpm/rpmv*
-rwxr-xr-x  1 root cdwriter  134764 Apr 27 04:09 scgcheck*
-rwxr-sr-x  2 root slocate    27256 Jan 29 07:59 slocate*
lrwxrwxrwx  1 root adm           49 May  7 05:48 smbldap-groupadd -> ../../usr/share/samba/scripts/smbldap-groupadd.pl*
lrwxrwxrwx  1 root adm           49 May  7 05:48 smbldap-groupdel -> ../../usr/share/samba/scripts/smbldap-groupdel.pl*
lrwxrwxrwx  1 root adm           49 May  7 05:48 smbldap-groupmod -> ../../usr/share/samba/scripts/smbldap-groupmod.pl*
lrwxrwxrwx  1 root adm           50 May  7 05:48 smbldap-groupshow -> ../../usr/share/samba/scripts/smbldap-groupshow.pl*
lrwxrwxrwx  1 root adm           57 May  7 05:48 smbldap-migrate-accounts -> ../../usr/share/samba/scripts/smbldap-migrate-accounts.pl*
lrwxrwxrwx  1 root adm           55 May  7 05:48 smbldap-migrate-groups -> ../../usr/share/samba/scripts/smbldap-migrate-groups.pl*
lrwxrwxrwx  1 root adm           47 May  7 05:48 smbldap-passwd -> ../../usr/share/samba/scripts/smbldap-passwd.pl*
lrwxrwxrwx  1 root adm           49 May  7 05:48 smbldap-populate -> ../../usr/share/samba/scripts/smbldap-populate.pl*
lrwxrwxrwx  1 root adm           48 May  7 05:48 smbldap-useradd -> ../../usr/share/samba/scripts/smbldap-useradd.pl*
lrwxrwxrwx  1 root adm           48 May  7 05:48 smbldap-userdel -> ../../usr/share/samba/scripts/smbldap-userdel.pl*
lrwxrwxrwx  1 root adm           48 May  7 05:48 smbldap-usermod -> ../../usr/share/samba/scripts/smbldap-usermod.pl*
lrwxrwxrwx  1 root adm           49 May  7 05:48 smbldap-usershow -> ../../usr/share/samba/scripts/smbldap-usershow.pl*
-rwxr-sr-x  1 lp   sys        86072 Mar 24 21:18 ttink*
-rwxr-xr-x  1 root slocate      319 Jan 29 07:59 updatedb*
-r-xr-sr-x  1 root tty         7992 Nov 22  2003 wall*
-rwxr-sr-x  1 root tty         8332 Jan 30 07:40 write*

/usr/games:
-rwxr-xr-x  1 root games     625 Oct 13  2003 armagetron*
-rwxr-sr-x  1 root games 1073224 Oct 13  2003 armagetron.real*
-rwxr-sr-x  1 root games  240760 Jul 15  2003 lbreakout2*
-rwxr-sr-x  1 root games   43224 Jul 15  2003 lbreakout2server*

/usr/lib/emacs/21.3/i386-mandrake-linux:
-rwxr-sr-x  1 root mail 17976 Feb 12 11:54 movemail*

/usr/lib/evolution/1.4/camel:
-rwxr-sr-x  1 root mail 10212 Mar 12 07:26 camel-lock-helper*

/usr/lib/gimp/1.2/plug-ins:
-rwxr-sr-x  1 lp   sys    4604 Mar 24 21:18 gimp-mtink*

/usr/lib/rpm/* rpm rpm  ( All files and subdirectories ) /usr/lib/rpm directory itself is root root
usr/lib/vte:
-rwx--s--x  1 root utmp   9880 Feb 20 11:42 gnome-pty-helper*

/usr/sbin:
-rws--x---  1 root apache      9976 Nov  5  2003 apache2-suexec*
-rwxr-sr-x  1 root utmp        9880 Aug  1  2003 gnome-pty-helper*
-rwxr-xr-x  1 root kmem       98136 Jul  1  2003 lsof*
-rwxr-xr-x  1 root cdwriter   87372 Apr 27 04:09 rscsi*
-rwsr-xr-x  1 root bin        18104 Jul 18  2003 traceroute*
-rwxr-sr-x  1 root utmp        6128 Apr 20 08:21 utempter*

/usr/share:
drwxr-xr-x    2 htdig root   4096 May 11 04:03 htdig/
drwxrwxr-x    4 root  pvm    4096 May 12 06:42 pvm3/

/usr/share/doc:
drwxr-xr-x   2 root man  4096 May  7 05:52 man-pages-1.61/

/usr/share/doc/man-pages-1.61:
-rw-r--r--  1 root man 6054 Nov 12  2003 man-pages-1.61.Announce
-rw-r--r--  1 root man 1679 Dec 31  2002 README
-rw-r--r--  1 root man  822 Dec 24  2000 README.GNU-INFOvsMAN

/usr/share/locale/ru/LC_MESSAGES:
-r--r--r--  1 bin  bin    4444 Feb 24 07:21 gimp-libgimp.mo
-r--r--r--  1 bin  bin  106911 Feb 24 07:21 gimp.mo
-r--r--r--  1 bin  bin   34283 Feb 24 07:21 gimp-script-fu.mo
-r--r--r--  1 bin  bin  200933 Feb 24 07:21 gimp-std-plugins.mo

/usr/share/man:
drwxr-xr-x  2 root man    4096 Nov 13  2003 en/
drwxr-xr-x  9 root man    4096 May  7 05:52 ru/

/usr/share/man/man1:
-rw-r--r--  1 root man    3490 Aug 26  2002 intro.1.bz2
-rw-r--r--  1 root man    2975 Nov 13  2003 time.1.bz2

/usr/share/man/man2:
-rw-r--r--  1 root man  4114 May 27  2002 accept.2.bz2
-rw-r--r--  1 root man  2579 Jun  7  2002 access.2.bz2
-rw-r--r--  1 root man  1777 Dec 17  2001 acct.2.bz2
*** Many more man2 files but not all *** - Others are root:root

/usr/share/pvm3:
-rwxr-xr-x  1 root pvm   129 Feb 26 19:47 genpubkey*
-rwxr-xr-x  1 root pvm  1491 Feb 26 19:47 pvm*
-rw-r--r--  1 root pvm     0 Feb 26 19:47 pvmhosts
-rwxr-xr-x  1 root pvm   333 Feb 26 19:47 sendPublicKeyToHosts*

/usr/share/pvm3/conf:
-rw-r--r--  1 root pvm 591 Feb 26 19:47 LINUX.def

/usr/share/pvm3/lib:
-rwxr-xr-x  1 root pvm   559 Feb 26 19:47 debugger*
-rwxr-xr-x  1 root pvm  1582 Feb 26 19:47 debugger2*
-rwxr-xr-x  1 root pvm  2388 Feb 26 19:47 pvmd*
-rwxr-xr-x  1 root pvm  6861 Feb 26 19:47 pvmgetarch*
-rwxr-xr-x  1 root pvm   347 Feb 26 19:47 pvmtmparch*

/usr/share/pvm3/lib/LINUX:
-rwxr-xr-x  1 root pvm 288888 Feb 26 19:47 pvm*
-rwxr-xr-x  1 root pvm 156984 Feb 26 19:47 pvmd3*
-rwxr-xr-x  1 root pvm 151096 Feb 26 19:47 pvmgs*

/usr/share/samba/scripts:
-rwxr-x---  1 root adm   4367 Mar  1 16:08 smbldap-groupadd.pl*
-rwxr-x---  1 root adm   2324 Mar  1 16:08 smbldap-groupdel.pl*
-rwxr-x---  1 root adm   7869 Mar  1 16:08 smbldap-groupmod.pl*
-rwxr-x---  1 root adm   1884 Mar  1 16:08 smbldap-groupshow.pl*
-rwxr-x---  1 root adm   7168 Mar  1 16:08 smbldap-migrate-accounts.pl*
-rwxr-x---  1 root adm   4974 Mar  1 16:08 smbldap-migrate-groups.pl*
-rwxr-x---  1 root adm   5599 Mar  1 16:08 smbldap-passwd.pl*
-rwxr-x---  1 root adm   8995 Mar  1 16:08 smbldap-populate.pl*
-rwxr-x---  1 root adm  16079 Mar  1 16:08 smbldap-useradd.pl*
-rwxr-x---  1 root adm   2950 Mar  1 16:08 smbldap-userdel.pl*
-rwxr-x---  1 root adm  15085 Mar  1 16:08 smbldap-usermod.pl*
-rwxr-x---  1 root adm   1826 Mar  1 16:08 smbldap-usershow.pl*
-rwxr-x---  1 root adm   5757 Mar  1 16:08 smb-migrate*

/usr/sbin:
-rws--x---  1 root apache      9976 Nov  5  2003 apache2-suexec*
-rwxr-sr-x  1 root utmp        9880 Aug  1  2003 gnome-pty-helper*
-rwxr-xr-x  1 root kmem       98136 Jul  1  2003 lsof*
-rwxr-xr-x  1 root cdwriter   87372 Apr 27 04:09 rscsi*
-rwsr-xr-x  1 root bin        18104 Jul 18  2003 traceroute*
-rwxr-sr-x  1 root utmp        6128 Apr 20 08:21 utempter*

/usr/share:
drwxr-xr-x    2 htdig root   4096 May 11 04:03 htdig/
drwxrwxr-x    4 root  pvm    4096 May 12 06:42 pvm3/
Also the directories in /usr/share
[root@matrix etc]# ls /usr/share -l | grep -v 'root root'
total 1252
drwxr-xr-x 2 htdig root 4096 May 11 04:03 htdig/
drwxrwxr-x 4 root pvm 4096 May 12 06:42 pvm3/
drwxr-xr-x 2 root man 4096 Nov 13 2003 /usr/share/man/en/


Many of the files in /usr/share/man/man2 had group of man. However not all, and man1 files had group owndership of root, so may not be important.

In the /etc directory:
/etc/dumpdate root disk
/etc/samba root adm
/etc/samba/smb/dap_conf.pm root adm
/etc/ptal-printd-like root lp

In the /bin directory
/bin/mail root mail
/bin/rpm rpm rpm

Code:
[root@matrix var]# ls -ld /var/* | grep -v 'root   root'
d-wx-wx-wt   2 apache apache 4096 Mar 17 01:21 /var/apache-mm/
drwxrwxr-x  15 root   man    4096 May  7 05:52 /var/catman/
drwxr-xr-x   3 ftp    ftp    4096 Nov 20  2003 /var/ftp/
I left out inside /var/spool/postfix - you may need to reinstall this app if you use it.

Last edited by jschiwal; 05-30-2004 at 09:36 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how to restore the default file permissions (whole system) ? bbbb Linux - General 2 11-05-2005 05:10 AM
Advice: consistency in file system permissions tisource Linux - General 1 08-15-2005 07:15 PM
file system permissions problem guy24x Linux - Security 8 04-07-2005 07:09 PM
System wide KHTML colors ProtoformX Linux - Software 1 04-02-2005 11:13 AM
System Wide Permission lmanwarren Linux - General 1 03-29-2005 09:15 PM


All times are GMT -5. The time now is 09:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration