0

I ran chmod -R 644 / as user on an AWS EC2 instance.

Now, every time I navigate to a folder or list it, it shows:

-bash: /home/ec2-user/.rvm/scripts/initialize: Permission denied
-bash: /home/ec2-user/.rvm/scripts/hook: Permission denied

Is there a way to solve it?

2
  • this is either how to change permissions after accidentally lockinf yourself out from doing it,or finding what the old permissions were and restoring them. The latter would be an interesting q
    – barlop
    Mar 3 '15 at 2:04
  • I was doing chmod -R 777 ./ but I miss the .. And, in the lapse of the moment I tried to fix, without thinking, chmod -R 644 /. After I disconnect from ssh I could not connect anymore. Probably mess up with something related to the ssh keys. Because of it was a new instance, I decide to start a fresh new other and be more careful with my words. Mar 3 '15 at 12:55
0

Become owner of those files/folders.

chown /home/ec2-user/.rvm/scripts/initialize
chown /home/ec2-user/.rvm/scripts/hook

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.