Reading and uncompressing Apache2 error.logs

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.4
Webmin version 2.111
Usermin version 2.010
Virtualmin version 7.10.0 Pro
Theme version 21.10
Package updates All installed packages are up to date

I am trying to look at my Apache2 error logs. The current error log which I can read does not contain the information that I am looking for. However, I see some compressed logs (.gz) on my system that do cover the time period that I am interested in. When I try to read these files it is garbarge, as expected. I tried uncompressing it, but it wants a password, which I do not know. I am running as the root user on my system. I see the decrypt function but there again, I do not know the cryption key. So how do I read this file.

Have you tried zless?

I can’t imagine these are encrypted or password protected.

What do you mean “it wants a password”? What wants a password? The compressed files in /var/log are not password protected. A normal user won’t be able to uncompress in the /var/log directory, generally, but it’s not because it’s password protected, but because normal users can’t write arbitrary files to /var/log/apache2 or whatever.

Hi Joe,
I logged in as the root user
I am using filemanager.
I am using the extract command on the file “error.log13.gz” but I get this error message

image

Then I see this:

but the directory “error.log.13” is empty

If I use the decrypt command I get this;

image

the word incorrect is missing, but you get the picture.

So I do not know how to read this log and it is useless to me. Yes I agree it does not make sense to encrypt an error log.

So, it is not obvious how to look at this.
Thanks.

Michael

Probably a problem with file manger. Use a terminal and zless.

zless /var/log/mail.info.4.gz

It looks like it is not working correctly. The first time I tried it it gave me a window to put a password in. I didn’t fill it out so I don’t know if it worked. Second time I tried no window. It just creates an empty directory.

If you really want to see its contents and you are not comfortable in terminal just download it with filemanager, decompress it and open it in a text editor.

I cannot reproduce this issue!

Try checking Properties for that file by pressing Alt+Enter while the row for the file is selected using the arrow keys (up/down), or by running file /var/log/apache2/error.log13.gz (or whatever the file name is).

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.4
Webmin version 2.111
Usermin version 2.010
Virtualmin version 7.10.0
Theme version 21.10:43
Package updates All installed packages are up to date

I get the same as op. makes an empty directory.

Thanks Zless worked for me.
MHR

I also see this issue! I’ll dig deeper into fixing it and will update this ticket with my progress.

1 Like

Thanks.
Michael

This issue has been fixed, and the patch will be included in the next Webmin release.

Thanks.
Michael

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.