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.
/var/lib
is not under/var/www
; are you sure about the command you used? You probably didsudo chown -R joy /var /www
--- notice the space between/var
and/www
(and thesudo
). That could have royally destroyed your system. Nevertheless, the fact that the system is asking your password for installing a package is completely normal./var
, which aren't owned byroot:root
: paste.ubuntu.com/8546503. You can use those as a reference (bro3886
is my username, so replace that withjoy
).