LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   A normal user now has write permissions for the whole file system (https://www.linuxquestions.org/questions/ubuntu-63/a-normal-user-now-has-write-permissions-for-the-whole-file-system-494723/)

16777216 10-22-2006 09:13 PM

A normal user now has write permissions for the whole file system
 
In trying to change the permissions of some files I backed up as root back to the proper owner I seem to have accidentally gave them write permissions to the whole file system.

how do I fix this?

background:

I dual boot Ubuntu and Win XP©.
Two IDE hard drives
XP on hda1 [ntfs] :
( now ) /media/Backup on hda2 [ext3]
/media/Storage on hdb1 [FAT32]
and the rest of my Linux partitions on hdb2 - 6.

So XP borks /media/storage by scrambling a directory. ( and I guess something else )
I run XP chkdsk and fix the offending directory.
I need to reinstall XP any way. ( it crashes every 30 min or so )
I decide to redo Ubuntu as well.
I reinstall XP. ( all goes good )
I boot the live CD, run the installer, and QTparted gives some kind of error about hdb and refuses to mount, edit or any thing.
After some trial & error I find that the option of erasing hdb will fix the problem. Oy...
I create /media/Backup
I mount /home
I copy my wife's and my own home directories to /media/Backup
Reinstall Ubuntu, recreate her user and mine .
Find out my back ups are owned by root, do a search find " do a chown -L -R user /dir/dir ( user being me or my wife and /dir being the dir to change ownership of )
I do this for her, now she has write permissions for everything.
( this is really bad because as even she puts she is " 'puter 'tupid " ( computer stupid ) )
I use a different method for my files that I can't remember right now, but they are fine.

I think that is about it.

-=Graz=- 10-23-2006 07:56 AM

Hmm this is strange.. If you do a #chown -R userid:groupid /directory it will change everything from /drectory recursively... as to how it changed the whole filesystem when specifying the /dir argument im not sure.. if you did a '.' however - now that would be different ;)
Im unsure how you could change permissions of root's files either - unless sudo worked i suppose.

Once you have changed the permissions of the entire filesystem i dont know that you can get them back to what they were (without manually doing it). Maybe you will need to restore your backup again ?

16777216 10-23-2006 09:32 AM

I either fixed or skrewed it worse
 
I said the hell with it and chown'ed with -R -L the whole file system back to root:root then chown'ed with -R the user directories back to them.

Seems to work so far.

If/when it goes to crap I will just reinstall.:D


All times are GMT -5. The time now is 07:26 PM.