0

I wanted to increase my servers upload_max_filesize, so I downloaded the PHP.ini file from /etc/ made the change locally and then uploaded the file via FTP.

During the upload the FileZilla mentioned that I was overriding the file on the server with my local copy, the difference in filesize was significant (which it shouldn't have been), something in the region of 67kb > 25kb.

After the upload, I've completely lost control of the installation. For instance the following command:

sudo chown -R ec2-user /ect/

Resulted in the following:

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 

I'm not sure what I've done. I've clearly overridden the wrong file. Maybe I override a shortcut or a file in a shortcut.

Any suggestions on how to recover the mystery file?

3
  • As a note - this is a dev environment I use for checking solutions before carrying them out in a live environment. Commented Nov 30, 2017 at 0:31
  • You've pretty well screwed your instance. Restore a backup from a snapshot or start a new instance. Then don't run that command again. Commented Nov 30, 2017 at 1:48
  • Thanks, I figured as much. I'll have a look at the last snapshot I ran. Not had to restore from one before. Commented Nov 30, 2017 at 10:58

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.