3

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!

2 Answers 2

8

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

2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .