View previous topic :: View next topic |
Author |
Message |
stony n00b
Joined: 25 Sep 2007 Posts: 8
|
Posted: Tue Sep 25, 2007 6:36 pm Post subject: WHOLE SYTEM Permitions !!! |
|
|
Ooops! I did it again !
I ran a Code: | chown -LR myuser /home |
as root of coarse ! ( was trying to get permissions back on my /home partition since there is about 5 users from many triedout distros in there and i wanted to clean it up but I did not think about wine !!!!
Why wine well many of those home folders had a .wine/dosdevices/Z (link to /)
so I ended up chowning the whole system
weirdly enough I can still login as root but not su to root
I did not reboot nor shutdow X (wich is still logged in as my user yuppy i can use firefox !?!
now i thought of unmounting /home and run
but I tought this could be even worst as i know many files are usualy owned by nobody or sound or video etc...
is there something i can do I waited 2 1/2 days to get gentoo to compile (I just manage to finish kde there is not much installed yet) and I DONT want to reinstall that is the lazy windows way of things ! i am shure there is some script of fuction somewhere to do just that i did not change any permissions it's a basic plain install of gentoo ! PLEASE HELP ME ! _________________ Ooops! |
|
Back to top |
|
|
stony n00b
Joined: 25 Sep 2007 Posts: 8
|
Posted: Tue Sep 25, 2007 6:39 pm Post subject: |
|
|
ps: I realized it while chown was doing it's job so i did CTRL+C it but the damage is there ! _________________ Ooops! |
|
Back to top |
|
|
stony n00b
Joined: 25 Sep 2007 Posts: 8
|
Posted: Tue Sep 25, 2007 6:47 pm Post subject: |
|
|
is there a way to get a lst of defaul permissions so i could do a script to fix that !
sorry should have edited my post instead of replying but hey ! _________________ Ooops! |
|
Back to top |
|
|
stony n00b
Joined: 25 Sep 2007 Posts: 8
|
Posted: Tue Sep 25, 2007 7:25 pm Post subject: |
|
|
or if anyone knows of a emerege function that causes it to reset each files permition on a package qithout recompiling it !
I am trying to find a solution !
I know that if anyone can give me a list of all file permissions on a basic gentoo 2007.0 install that only has kde-meta, beryl firefox-bin
(with a hole lot of use flags)!
Code: | USE=" 3dfx 3dnow 7zip X Xaw3d a52 aac aalib ace acpi addbookmarks administrator adns adplug afs aim akode \
alias alsa cab rar amarok ao cups apache2 apm arts audiofile bcmath bidi blas bonobo bzip2 cairo calendar \
caps cdb cddb cdparanoia cdr clamav cscope ctype -curl curlwrappers dbase dbm dbus dbx dga \
dv dvb dvd dvdr dvdread eds emacs emboss encode esd evo examples exif expat fam fastcgi \
fbcon ffmpeg fftw filepro -firebird firefox flac flatfile fltk foomaticdb ftp gb gcj gd geoip \
ggi gif glitz glut gmp gnome gnustep gphoto2 gstreamer gtk gtkhtml guile hal hyperwave-api icq \
imagemagik imap imlib -informix inifile innodb jabber jack java javascript jbig jikes joystick \
jpeg jpeg2k kde kerberos krb4 ladcca ladspa lapack lash lcms -ldap leim libcaca libgda libnotify \
libsamplerate libwww lirc lm_sensors lua m17n-lib mad maildir mailwraper mbox mcal mcve memlimit mhash \
mikmod milter mime mmap mmx mng mnogosearch mono motif mozilla mp3 mpeg mpi mplayer msn mule musepack \
musicbrainz mysql mysqli nas neXt netcdf nis nntp nocd nsplugin odbc offensive ogg openal openexr \
opengl osc oss pdf pfpro php plotutils png portaudio posix postgres ppds \
pulseaudio -qt3 qt4 quicktime radius rdesktop ruby samba sasl sdl seamonkey sharedext \
shorten simplexml skey slang slp smartcard sndfile snmp soap sockets sox speex spell sqlite sqlite3 \
sse sse2 startup-notification svg svga symlink sysvipc szip tcl tetex theora threads tidy tiff tk \
tokenizer truetype usb v4l vcd videos vim-syntax vorbis wddx wifi win32codecs winpopup wmf wmp wordperfect wxwindows \
x264 xcf xcomposite xface xine xinerama xinetd xml xmlparser xmlrpc xosd xplanet xpm xprint xscreensaver xsl xv xvid yahoo yaz zip" |
_________________ Ooops! |
|
Back to top |
|
|
jabol Apprentice
Joined: 05 Oct 2005 Posts: 269
|
Posted: Tue Sep 25, 2007 7:44 pm Post subject: |
|
|
shit, you've messed it up... try downloading stage3 for getnoo, there are at least basic permissions. Than just rechown the things that don't work
and there is a small hope for you. most basic system users have a group with the same name. so for example, most portage files are owned by portage:portage, not portage:root, so if you rechowned them to root, they are now owned by root:portage (the notation stands for user:group). So you could guess the original owner by checking which group own the file...
Last edited by jabol on Tue Sep 25, 2007 7:46 pm; edited 1 time in total |
|
Back to top |
|
|
stony n00b
Joined: 25 Sep 2007 Posts: 8
|
Posted: Tue Sep 25, 2007 7:46 pm Post subject: |
|
|
not a bad idea actually !
I can extract the stage3 and make a script to compare permissions !
and as you said there will be much less left !
great even better with the groups stuff
did see it ! I feel i am getting somewhere ! _________________ Ooops!
Last edited by stony on Tue Sep 25, 2007 7:49 pm; edited 1 time in total |
|
Back to top |
|
|
jabol Apprentice
Joined: 05 Oct 2005 Posts: 269
|
Posted: Tue Sep 25, 2007 7:47 pm Post subject: |
|
|
*bump* for you. see the second note, I've edited my post.
although it does not always work... some examples where it does not work would involve:
Code: | drwxrwx--T 2 root gdm 232 2007-09-25 21:36 /var/gdm/
drwxrwxr-x 3 root uucp 96 2007-09-25 21:36 /var/lock/
drwxr-xr-x 3 apache root 80 2007-05-30 14:42 /var/www/ |
But than: Code: | drwxr-xr-x 158 portage portage 4680 2007-09-17 14:07 /usr/portage/
drwxr-xr-x 6 apache apache 144 2007-05-30 14:42 /var/www/localhost/
|
|
|
Back to top |
|
|
jabol Apprentice
Joined: 05 Oct 2005 Posts: 269
|
Posted: Tue Sep 25, 2007 7:54 pm Post subject: |
|
|
And now, again a nice idea.
For Gentoo, emerge -e world should repair all system stuff. I believe that doing the /home directory right isn't a problem.
There would be only some catalog's like /var/lib or /var/www to hand-repair, but this should also not be a problem.
And mind it, most system files are root:root, but with liberal permissions, sth like 755 for directories and 644/755 for file (normal/executables), so it's not a hard guess also. The problem is only which are the restricted areas, but then, you didn't really messed up permissions but only ownership. |
|
Back to top |
|
|
stony n00b
Joined: 25 Sep 2007 Posts: 8
|
Posted: Tue Sep 25, 2007 8:10 pm Post subject: |
|
|
yes just ownership and not to all files !
I am workin on a script (in a chrooted environement to test so I dont mess it up more LOL) in a shell since I cannot su to root in a terminal ! grr lots of ALT+-> or ALT+<- lol
I mean I am working in a vtt terminal ! canot su in a shell ! lol _________________ Ooops! |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9539 Location: beyond the rim
|
Posted: Wed Sep 26, 2007 12:03 am Post subject: |
|
|
Another problem is that the chown will also have changed some permissions, namely the SUID bits of certain executables like su, so they won't work correctly anymore. |
|
Back to top |
|
|
stony n00b
Joined: 25 Sep 2007 Posts: 8
|
Posted: Wed Sep 26, 2007 1:03 am Post subject: |
|
|
if I could just find a list of default ownership and permissions for a basic system _________________ Ooops! |
|
Back to top |
|
|
jabol Apprentice
Joined: 05 Oct 2005 Posts: 269
|
Posted: Wed Sep 26, 2007 7:55 am Post subject: |
|
|
stony wrote: | if I could just find a list of default ownership and permissions for a basic system | stage3 tarball / emerge -e world. |
|
Back to top |
|
|
domdorn n00b
Joined: 20 Jan 2003 Posts: 24 Location: Lustenau/Austria
|
Posted: Wed Sep 26, 2007 4:24 pm Post subject: |
|
|
what kind of system are you running ? 32bit or 64bit?
basically it could be done by doing a
cd /
ls -nR > rightfile
and then creating a script that reads the content of this file and chown the files according to the entries in the file.
at least, that would be the way i would do it.
greetings,
dominik _________________ Linkin Park lyrics
[a|my] great Lyrics Page |
|
Back to top |
|
|
stony n00b
Joined: 25 Sep 2007 Posts: 8
|
Posted: Wed Sep 26, 2007 4:55 pm Post subject: |
|
|
32bit
yes that is almost what i was about to do but I think I may just reinstall everything instead, it might be long but at least i will be shure no bugs are left behind !
thanks anyway ! _________________ Ooops! |
|
Back to top |
|
|
|