Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I wasn't paying attention (late at night) and executed this command
chown user.user -R *
I ment to do it in a folder, but accidently ran it in / and before I knew it I was getting some permissoin errors.. opps... (it was stupid of me... I know..)
Im wondering can I run a command to back to revert all the permissions? Or undo my last command?
well if you ran chown as root, i'd say you're pretty much hosed unless you got images of your linux install on cds/dvds. if you ran it as a regular user, then you don't really need to worry about it as even if the user owns a file, he can't change ownership of the file. my guess is that if you ran the chown command as a user, those are the permission errors you were getting.
How long did you let it run before killing the command with ctrl+c? edit- I assume it was run by root.
To play it safe with recursively argumented commands I try to remember to use the verbose arg. with it so I can see what it it is doing and kill it quick if its wrong (there is a considerable performance hit while program lists its actions to con). But of course I don't and just rerun the command with -v to see what it actually did. ( !! -v ) And I assume the program will follow the same path of destructiveness as when run without verbose. So far I have assumed correctly noted the path it took and been able to repair the affected files, manually using more recursive commands when possible -ugh.
Distribution: CentOS 3.3-4, OpenBSD 3.3, Fedora Core 4, Ubuntu, Novell Open Enterprise Server
Posts: 213
Rep:
From now on, look into Mondo. It has saved my ass more than once. You can do a 'rm -rf /' as root and have your system back up and running in an hour or so.
Thanks for all the information... I let the command run until... well it spit back at me with some errors... It was too late.. I took it as a time to change from Red hat to SuSE, since well Red Hats only doing their enterprise version and well fedora which I don't think is ready for my home yet.
enigmasoldier: I will definately look into that backup tool Thanks for the link!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.