[ SOLVED ] Error message when I open log viewer

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
User avatar
mintymintminty
Level 2
Level 2
Posts: 86
Joined: Mon May 17, 2010 7:37 pm
Location: Scotland UK

[ SOLVED ] Error message when I open log viewer

Post by mintymintminty »

Just noticed when I open the log viewer at the top with a big red cross I have the message : /var/log/mail.log Error when getting information for file '/var/log/mail.log': No such file or directory. I'm running Cinnamon 17.2 and wondering how can I fix this? Thank you.
Last edited by mintymintminty on Sun Aug 02, 2015 12:21 pm, edited 2 times in total.
User avatar
karlchen
Level 21
Level 21
Posts: 13078
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Error message when I open log viewer

Post by karlchen »

Hello, mintymintyminty.

Has this error message started appearing only recently or has logviewer opened in the past and displayed mail.log without complaining?
In order to find out why logviewer cannt open the file, you might open a terminal window, execute the following commandlines ad post back the screen output here.
  • Code: Select all

    ls -l /var/log/mail.log
    Display whether the file exists and who is the owner and who is its group and which are the access permissions.
  • Code: Select all

    id
    Display your own username, UID and GIDs. This should tell whether your user is entitled to open the logfile mail.log for viewing.
Cheers,
Karl
Image
Linux Mint 19.3 64-bit Cinnamon, Total Commander 9.51 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)
User avatar
mintymintminty
Level 2
Level 2
Posts: 86
Joined: Mon May 17, 2010 7:37 pm
Location: Scotland UK

Re: Error message when I open log viewer

Post by mintymintminty »

Hi Karlchen I don't know what has went wrong but I think it's the first of me coming across this since I installed mint over a week ago. I get this from the terminal with the first command you gave me : ls: cannot access /var/log/mail.log: No such file or directory

And your second command gives me this : uid=1000(steven) gid=1000(steven) groups=1000(steven),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),110(sambashare)
User avatar
karlchen
Level 21
Level 21
Posts: 13078
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Error message when I open log viewer

Post by karlchen »

Hello, mintymintyminty.

The output of the "id" command tells that your account would be able to open the logfile /var/log/mail.log provided it existed, because your account is a member of the usergroup "adm", and by default the access permissions of mail.log are such that members of "adm" can read the file.

Yet, as the "ls" command suggests, the file seems to be absent on your system. No idea why. Yet, logviewer wants to open it, but cannot, because it does not exist.
On the one hand the error itself could be ignored, but on the other hand it might be annyoing to confirm the error message whenever one launches logviewer.

The easiest solution will be creating an empty mail.log file.

Terminal commands:

Code: Select all

sudo touch /var/log/mail.log
sudo chown syslog:adm  /var/log/mail.log
sudo chmod  640  /var/log/mail.log
This should make the logviewer complaints go away.

HTH,
Karl
Image
Linux Mint 19.3 64-bit Cinnamon, Total Commander 9.51 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)
User avatar
mintymintminty
Level 2
Level 2
Posts: 86
Joined: Mon May 17, 2010 7:37 pm
Location: Scotland UK

Re: Error message when I open log viewer

Post by mintymintminty »

Hi Karlchen,

I have ran them commands and the error message doesn't pop up now. Is it worth mentioning that in the sub categories of my log viewer I only have four. Xorg.O Log : auth.log : dpkg.log : the empty mail log since running them commands and syslog. I'm sure on linux mint mate I had more categories than that. Is it something to be worried about? Many thanks for your help with this I really appreciate it.
User avatar
karlchen
Level 21
Level 21
Posts: 13078
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Error message when I open log viewer

Post by karlchen »

Hi, mintymintyminty.

You can open more logfiles from /var/log which you would logviewer to display by default. logviewer will remember the list of opened logfiles. :)

Cheers,
Karl
Image
Linux Mint 19.3 64-bit Cinnamon, Total Commander 9.51 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)
User avatar
mintymintminty
Level 2
Level 2
Posts: 86
Joined: Mon May 17, 2010 7:37 pm
Location: Scotland UK

Re: Error message when I open log viewer

Post by mintymintminty »

Hi Karlchen

I have been in and read the /var/log I've read ones that are not appearing in the log viewer but they're not opening with log viewer after I have done this?
Post Reply

Return to “Newbie Questions”