HELP: chown used mistakenly

Asked by Hans

I am still a beginner with Lunux, using Kubuntu 8.04.

By mistake I applied the command "chown -cR name:users /*" as root within my mail subdirectory -

and I had to realize that change was applied to *all* files on the machine!!! I stopped that with Ctrl-z.

Is there a chance to undo that disaster?

For the time being, I left everything unchanged.

Thanks

Hans

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu kdebase Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Larry Jordan (larryjor) said :
#1

     It seems possible, but I don't have an account that uses a mail directory anymore. Also, the directory as you specified on the command line above is "/*", which is the root directory anyway (wouldn't be just the mail directory). If you meant to say "chown -cR name:users ./*" (with a period before the slash), then it only occurred in the mail directory.
     I don't see the "name:users" as an option in the chown man page, but assuming you know what you were doing there. You should STILL be able to change permissions and ownership on files as root at any time, as long as "root" still has access, but as far as who the owner should be - don't think anyone wants to try to track that if you DID do it as just a slash.
     By the way, if you're not sure what you typed originally, you know you can use the "history" command to double check.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

yes, / is the lowest folder and is called root. You have a massive hill to climb now. You will have to read forums on what ownerships files and folders have and apply them to the ENTIRE system.

I suggest you cut your loses and reinstall, you can restore your user data from your backups if home is not on a seperate partition.

If you fancied trying to get it working you could always boot to live cd as the live environment is sysnonymous with an installed one, you can then make a note of the ownerships and apply them to your system.

Nearly all the files and folders outside of your home directory are owned by root:root but their are some files and folders that have slight differences which you must accommodate for.

Can you help with this problem?

Provide an answer of your own, or ask Hans for more information if necessary.

To post a message you must log in.