-2

I keep getting permission denied errors when attempting a command. I need to access the error log for the server and mysql due to a website meltdown. eek. As far as i'm aware I am able to login to the site. The code below is what I see once logged in.

login as: luffit
[email protected]'s password:
Last login: Thu May 26 04:20:32 2016 from 86.31.138.172

So once in I try and run an error command for example:

   /usr/local/cpanel/logs/error_log

The outcome:

luffit@s45-40-136-69 [~]# /usr/local/cpanel/logs/error_log
-bash: /usr/local/cpanel/logs/error_log: Permission denied

Unfortunately I need to access these logs to be able to fix the site so any help will be much appreciated.

Thanks

1 Answer 1

4

That's because you're not running a command. Try: less /usr/local/cpanel/logs/error_log or more /usr/local/cpanel/logs/error_log.

2
  • This is comparable to typing "C:/Windows/logs/error.log" in cmd, it will try to run the file you specify. In windows you would type "notepad C:/Windows/logs/error.log" thus, in linux, you would use a program like "less", "more" or "nano". The first two are for reading and searching files, the latter is an editor and is less likely to be installed by default on a server.
    – Alex Berry
    May 26, 2016 at 14:07
  • Hey guys - thanks for your response - sorry i'm not the most literate when it comes to servers so trying to pick up as I go. I tried running what was suggested but still recieve a "Permission denied" outcome. Thank you anyway May 26, 2016 at 15:41

You must log in to answer this question.

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