Riker
Riker

Reputation: 33

Amazon EC2 Chmod-ed etc to 644

Hy guys,

I chmod-ed /etc/ to 644 while logged in as ec2-user and now i cannot access /etc

" -bash: cd: etc/: Permission denied "

How can i get my permission back? I cannot login as root through putty - it says to log in as ec2-user.

I am a rookie in linux and AWS.

Upvotes: 0

Views: 646

Answers (1)

Eugene Naydenov
Eugene Naydenov

Reputation: 7295

To get a root access log-in as ec2-user, then type sudo su - to change the user to root. After that you can change directory permissions back.

Also you can just use sudo chmod under ec2-user.

Upvotes: 1

Related Questions