0

Using putty, by mistake, I've used this command to change the folder permission /etc:

sudo chown -R ec2-user:ec2-user /etc

Now when I'm trying to restart my Apache server the result is:

$ sudo service httpd restart

sudo: /etc/sudo.conf is owned by uid 500, should be 0
sudo: /etc/sudoers is owned by uid 500, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

How to recover of this situation? I don't have physical access, but I have WinSCP and I can change permission directly.

pa4080
  • 29,831

0 Answers0