First off: bash me if you want to, I know, it is true, I am ashamed: I am one of those awful register-->newthread-->stupidquestion users... on top of that my question isn't even that vital so here's one topic not to waste your time on :P
that said, here is my story. it all began when I suddenly had an extra whole re-virgined 200 GB drive at my disposition, ready to be mounted. I wanted to do something useful with it (for a change) so instead of mounting it under /mnt/lenewdrive I decided to try and mount it under /usr . since I am probably the linux users that knows the least commands in the world, I couldn't even stand thinking of doing it by hand and quickly brought up the configuratiopanel (drakconfig) to do my thing in the nice graphical disk manager (harddrake?) . the formatting went fine, and I created a few partitions (one of which was /usr) on the new drive and thought that while I was at it I might as well switch the swap partition to that drive instead of having it on the same disk as where / was mounted. the "warning: parition table is going to be written to be written to disk" was of course ignored with a smile and my confidence even rose at a moment when he asked me if I wanted to copy all the data that was currently located in /usr to the new drive. that surely could only mean it was going the right way...?
appearantly; it didn't. that's where everything started to go downhill (really fast). he wrote the changes to fstab and remounted everything. I was sitting with a Konsole window on top, waiting, and playing around with echo (it's true, I did). suddenly; no more echo. no more ls. no more dc, no more su, nothing. everything got an error message (that I forgot but of which I am sure it wasn't permission denied) and I was struck with terrible fear ( "I KNEW I shouldve backed up that data.." ). I pressed the reboot button, hoping only the remounting had gone wrong and everything would be fine once again, but it got worse. he refused to boot; lilo did fine (I could still boot into other operating systems located on other drives) and even the first few steps of the boot process were fine. at the point of "mounting the filesystem" I was dropped into some panick terminal, pressing ctrl+d would only kick me out, reboot and drop me in it once again and entering the root password didnt help much either; no ls, only fsck and ed2fsck and stuff like that seemed to react though not even start because of a lot of errors on the drive in question). I ran Partition Disk Doctor and it fixed a whole lot of "header sectors" (?) which were located at twohundredsomething instead of 1, which actually worked. I could now boot in knoppix and access the drives and the data (something I couldnt do before I had ran PDD) and I restored the /etc/fstab file to a minimum (/ , swap and the cdroms and a samba share). I copied all the files from the new harddisk back into /usr on the old drive and rebooted. this worked: the booting was successful. until the starting of x; an error message flashed by, to fast to be read, and I was dropped in a text-login. logging in normally wouldnt work, only the root could. I logged in as root, and the first thing I tried: "su bubblboy" . it didnt work; "/bin/bash: permission denied" . the disk itself seemed pretty ok; I could vi all the text files I wanted and I could start emacs and lynx and access my /usr directory. another try (as root): "startx". I got an error message complaining about some file not existing (I didnt write it down, Im not even sure that was the error.. sorry :S ), though I checked the file in question and it was pretty much there with pretty much the good permissions. so I tried resolving the problem in my own way (here it comes): "chmod -R 664 /usr" (I know, but I was desperate!). I thought maybe some file permissions were changed during the transfer so I tried to make them ALL readable. no luck. and that was where I gave up and decided to look for help.
though, that is not the end (unfortunatly for the reader of this post). just a few moments ago I got tired of waiting and thought "whatthehack, Ill just reinstall the mf'er." so, time for backup. samba worked just fine, so I set up a samba share. in my own primitive way. I shared / to be able to backup whatever I wanted using the other computer. but since the samba user was not root, I had to change the whole system permissions. "chmod 775 -R / ". I did it. I even added -v to make it look cool. I didnt care much anymore anyway; the system was going down for reinstall anyway. so I backed up a few files and rebooted, but left, forgetting to put in the installation disc. After a few minutes, I come back into the room, and what do I see: the KDE login screen, beautifully shining in all it's graphical glory. " O_O " . it felt like seeing water burn... I had forgotten all about the last chmod, so this was THE mystery. I logged in; everything worked fine! KDE started, my wallpaper showed up, everything. I thought.
This is where I am now. I can do everydaylife things, but looking more carefully I see a lot of problems. first off: my whole filesystem is now 775. bad thing. for sure. even I know that. second; some side-effects. probably related to the 775 thing...
[bubblboy@zeus ~]$ su
su: cannot set groups: Operation not permitted
for example. so; "how do reset the filepermissions across my WHOLE system?" I am sorry to have make it come this far, I am stupid and I know it.. then again; I wasnt counting on the system suddenly going back up again. I thought everything was lost anyway. Is there still a fix to this...?
to all of you who bothered reading this: thank you.
to all of you who actually reached down here; thank you even more!
Mandriva 2006.0 official here btw...
edit>> sorry, I thought it was 775 but appearantly it was 755... ._.
edit>> I suddenly thought of something that I forgot to mention. I have a spare computer here, so if needed I could install mandriva on that one and then for example copy all the file permissions...? I do not know how that should be done though, and then of course there is still the problem dealing with the custom files. this is no ultra-secure server problem though; it is just my home computer and I think I wouldnt even mind everyone being able to look in the configurations of some messenging program or my jre. as long as the basic things like /etc/shadow and /etc/samba/sambapasswd are restricted Im happy enough..
(was that of any help?)