Ubuntu 11.10 can't read log files

Asked by Loren41 on 2011-11-10

When I run the Log File Viewer in Ubuntu 11.10, I receive the following message:
Could not open the following files:
/var/log/auth.log.1: Error stating file '/var/log/auth.log.1': No such file or directory
/var/log/kern.log.1: Error stating file '/var/log/kern.log.1': No such file or directory
/var/log/btmp: You don't have enough permissions to read the file.

What is causing this and how do I fix it?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-utils Edit question
Assignee:
No assignee Edit question
Solved by:
Loren41
Solved:
2011-11-11
Last query:
2011-11-11
Last reply:
2011-11-10

sudo touch /var/log/auth.log.1; sudo touch /var/log/kern.log.1

Then run the log viewer with gksudo, should be ok

Loren41 (loren41) said : #2

This removed the auth.log.1 message but the kern.log.1 and permissions messages remain.

Sam_ (and-sam) said : #3

'btmp' message is a one hundred paper cut bug 374320
It actually only displays when there was a failed login attempt.
Interesting for admins to monitor, it shouldn't grow too large.
Hence it belongs to root, run in a terminal:
lastb

Logviewer is opened by the user this is why btmp complains.

http://www.question-defense.com/2009/07/03/how-to-read-varlogbtmp-rotate-the-btmp-log-with-logrotate

If you wish to avoid the complain in logviewer install dconf-tools.
When finished open a terminal: ctrl+alt+t
Run:
dconf-editor

Navigate to:
org.gnome.gnome-system-log

Look at 'logfiles', if btmp is there, double click on the line and remove the entry '/var/log/btmp', done.
Value 'logfile' is the one which displays the log file when opening logviewer the first time.
## This is how it's expected, but at the moment there're some pending bugs which won't fix in oneiric but are triaged for precise.

This message
< Error stating file '/var/log/auth.log.1': No such file or directory >
appears when auth.log isn't that old, so no logrotate yet to auth.log.1.
The message went away since the file was created via 'touch'.
Just have a look in /var/log which contents available log files.
https://help.ubuntu.com/community/LinuxLogFiles

Loren41 (loren41) said : #4

Thanks Sam. I appreciate your response.