0

I recently switched from Windows 8.1 to Ubuntu.

Yesterday, I wanted to install PHP but during tutorial I did this:

sudo chown -R joy /var/www 

but now onward for every command it ask for password

$ sudo apt-get install vlc 
sudo: /var/lib/sudo owned by uid 1000, should be uid 0
[sudo] password for joy: 

I tried to search on google about that & I come to know that I recursively granted ownership of the directory /var/www and all files and subdirectories, to user joy.

Now I want to reset everything back like before I recursively granted ownership.

Rmano
  • 32,167
Zarron
  • 1

1 Answers1

-1

Update:

Try this:
sudo chown -h root /var/lib/sudo

This will change the owner of /var/lib/sudo to root

devGeek
  • 594