Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

hi I have setup tomcat 7 through yum on an ec2 instance. I have access to the user ec2-user by default through aws from launching the ec2 instance.

I am trying to simply look at my tomcat logs with the command:

 cd: /usr/share/tomcat7/logs/

I get the error: Permission denied

ls -al shows the permissions on the tomcat7 folder as: drwxrwxr-x 3 root tomcat tomcat7

the same for logs shows: lrwxrwxrwx 1 root tomcat logs

I have read that the ec2-user has root permissions.

I attempt to sudo with the cd command but I get the error: sudo: cd: command not found

How can I get into this directory to see my logs?

Thanks!

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

Have you tried switching to the root account using sudo su?

share|improve this answer
add comment

cd isn't a program, so you can't sudo it. Do sudo -s and then cd into the directory.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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