Yesterday I accidentally changed the owner of /etc
folder group using this command:
sudo chown -R pts:apache /etc
I did this to upload a file from my end. Later when I tried to change it back to root:root
it showed this error:
sudo: /etc/sudo.conf is owned by uid 1001, should be 0
sudo: /etc/sudo.conf is owned by uid 1001, should be 0
sudo: /etc/sudoers is owned by uid 1001, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
I can't use sudo
anymore because of this.
How do I fix this? Thanks.