Reputation: 4750
So i did a chmod 777 ec2-user/
on my remote instance to solve a issue where i couldn't write to a file inside ec2-user
directory. But since this changed the permissions of .ssh
directory i could no longer ssh or scp into my remote instance.
Now I'm looked out unable to doing anything.
How can I fix this? I heard there's no other way rather than mounting that volument into a new instance created, but how do i do this? im really new to amazon ws.
EDIT I have tried to mount it to a newly created instance. Very strange issue: instance starts back again after stopping it and when i clicked on the Volumes tab, which makes it i can't detach the volume.
Upvotes: 0
Views: 113
Reputation: 37460
Stop the instance. Once it is stopped, detach the volume.
Create a new instance. Associate the detached volume with the new instance. Log into the new instance, and mount the attached volume. Now you can make any changes you need.
When you're done, reverse the changes: unmount the volume from your temporary instance, then disassociate it, re-associate it with the original instance, then start the original instance.
Upvotes: 1