3

I am an Ubuntu newbie, and I accidentally typed chown www-data:www-data * -R.
After a while, I tried to restart, but my computer couldn't even start, saying:

# Your screen, graphics cards, and input device settings could not be detected correctly. 
# You will need to configure these yourself. 

the command I executed is like this:

cd /home
sudo chown www-data:www-data * -R  
sudo usermod -a -G www-data username

Is there any way I can get out of this mess? Thank you

6
  • That command shouldn't do anything besides complaining about missing parameters. What command did you actually execute? – David Foerster Oct 13 '13 at 13:16
  • @DavidFoerster sudo chown www-data:www-data * -R followd by sudo usermod -a -G www-data username – meshsol Oct 13 '13 at 13:55
  • Ok, can you edit that into your question? The working directory of that command is relevant too. – David Foerster Oct 13 '13 at 13:58
  • I updated the question @DavidFoerster – meshsol Oct 13 '13 at 14:01
  • 1
    Good. Do you remember the working directory when you run that command? – David Foerster Oct 13 '13 at 14:03
1

Try booting using advanced settings, and do a system restore...there is an option for that on the ubuntu bootloader menu

1

If you accidentally change the ownership of everything in /home and it contains only home directories named after their respective owners, then you can revert that change as root like this:

cd /home
chown root:root .
for f in *; do
  case "$f" in
    lost+found) owner=root:root;;
    *) owner="$f:";;
  esac
  chown -R "$owner" "$f"
done

There may be a few corner cases like configurational or temporary files of some subsystem like X.org or Pulse inside those directories, which should be owned by root or some system account, but they shouldn't be too much of a problem.

Not the answer you're looking for? Browse other questions tagged or ask your own question.