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

meshsol
  • 151

2 Answers2

1

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

kelvinelove
  • 1,617
  • 1
  • 16
  • 26
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.

David Foerster
  • 36,264
  • 56
  • 94
  • 147