0

I'm very much new to ubuntu. Please help me to change my server settings.

I am trying to install wordpress. Accidentally I ran this command in root directory:

sudo chown -R demo:www-data *

Now all my directory ownership is changed to www-data. How can I change this back to default setting?

Please help

muru
  • 207,228
Dee
  • 3

1 Answers1

0

Hm. You might have to reinstall your OS :(. But first try switching to root with the command:

su

Then, from the root directory, run the command to give root ownership to everything:

cd /
chown -R root:root *

Then go to your user home directory and give ownership back to yourself with:

cd /home/username
chown -R username:username *

replacing username with your real username. Finally switch back to being your normal user:

su username