Permission denied to logs

I've SSH'ed into my server and would like to see my error logs. I ran the command:

 /var/log/nginx/error.log

but got the error message:

 -bash: /var/log/nginx/error.log: Permission denied

Suggestions on how to access these logs?

2 Replies

Linode Staff

I would try running the same command with sudo appended to the front. That said, you'll also want to run another command before the path. The following post has more information on what commands you can use to look through the logs:

How do I check my server's log files?

An example could be:

sudo less /var/log/nginx/error.log

That worked. Thanks!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct