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.
/etc
!? – pa4080 Nov 30 '17 at 11:03