Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question
up vote 4 down vote accepted

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

share|improve this answer

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

share|improve this answer

Your Answer


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.