strange zipped .gz logs in console

Hello all,

After I experienced some strange behaviour with my mini and mouse (a tablet that suddenly began ctrl clicking whenever i clicked any button) and a major slow down to my system for about 2-3 minutes while i was transcoding video file with VLC, I decided to check my console to see if there was any error/crash logs and noticed that there are multiple zipped (.gz) logs in the /var/log part. for every log file such as install, ipfw, ipr etc i have another labelled, for example install.log.0.gz.

These are zipped files as I can actually locate them by command clicking them in the title bar of console.

I do not have any of these on my powerbook. AND also, I can't seem to access the system log from my non-admin account. which I can do on my powerbook.

Can anyone please explain what the deal is with these zipped files?

Thanks

PowerBook G4 12 combo, Mac Mini (G4), Mac OS X (10.4.7)

Posted on Jul 5, 2006 12:02 AM

Reply
16 replies

Jul 5, 2006 10:55 PM in response to Mark Jalbert

The maintenance scripts have probably not run on your
powerbook.


Ok, I see.

As I said in my previous post only the
root user or an admin user can read the system.log.
Changing the file mode on the system.log could
compromise your computer. Log in as an admin user to
view the log.


but I can read the system.log from a non-user account on the powerbook. If this is not meant to be possible, has something been corrupted?

Jul 6, 2006 12:38 AM in response to Naj

If this is not meant to be possible, has something been corrupted?


Well, somehow thru your interaction, the file permissions have been altered on the system.log. Permissions on files can vary. Log files should have limited access to non-admin users. You can use the Repair Permissions function of Disk Utility to set the permissions on your system files to Apple's default settings.

Jul 6, 2006 11:05 AM in response to Mark Jalbert

I have repaired permissions, however still no change 😟

as far as i can remember, i've always been able to read the system log from my non-admin account on my powerbook. I have had limited access to other logs though. such as the ipfw, secure, windowserver etc logs.

However the mini is quite new, and i have only been using macs for just under a year now - so i don't really know how things 'usually' work.

do you have any other explainations?

I previously posted a thread concerning airport requiring admin password to connect and how it suddenly stopped but had no reply. the thread is;

http://discussions.apple.com/thread.jspa?threadID=484736&tstart=0

could this be somehow related?

by the way, thanks for all your help up to now.

Jul 6, 2006 11:24 AM in response to Naj

Naj
i've always been able to read the system log from my non-admin account on my powerbook
You will help Mark (and the rest of us) to help you better if you do the following on both your computers so we can see what is happening:

Open the Terminal (from /Applications/Utilities) and copy and paste the following into the Terminal window, one line at a time, with a return after each line:

id
ls -l /var/log/sys*

Then copy and paste all the output from Terminal, including the commands, identifying which computer it comes from.

Jul 6, 2006 1:09 PM in response to Michael Conniff

here goes;

mac mini;

id
uid=502(Naj) gid=502(Naj) groups=502(Naj)

ls -l /var/log/sys*
-rw-r----- 1 root admin 83274 Jul 6 19:32 /var/log/system.log
-rw-r----- 1 root admin 3573 Jul 3 21:10 /var/log/system.log.0.gz
-rw-r----- 1 root admin 4240 Jul 1 15:24 /var/log/system.log.1.gz
-rw-r----- 1 root admin 15455 Jun 30 06:48 /var/log/system.log.2.gz
-rw-r----- 1 root admin 17844 Jun 16 19:49 /var/log/system.log.3.gz
-rw-r--r-- 1 root wheel 35393 May 26 19:19 /var/log/system.log.4.gz

Powerbook

id
uid=502(naju) gid=502(naju) groups=502(naju)

ls -l /var/log/sys*
-rw-r--r-- 1 root wheel 1382430 Jul 6 21:03 /var/log/system.log

I hope that helps - i might not know anything about unix and darwin, but that must be unusual!?

Jul 6, 2006 1:35 PM in response to Naj

Naj

OK, it's simple really. On your PowerBook, "Read" permission is set for "Other" for the system.log, but this is not set on the mini.

If you had run "Repair Permissions" on both machines, this should not be the case. This is the "correct" output from that command when permissions are correct as set by Repair Permissions:
<pre>

ibook:/var/log michaelc$ ls -l /var/log/sys*
-rw-r----- 1 root admin 246 Jul 6 18:35 /var/log/system.log
-rw-r----- 1 root admin 758 Jul 6 18:17 /var/log/system.log.0.gz
-rw-r----- 1 root admin 1466 Jul 5 23:15 /var/log/system.log.1.gz
-rw-r----- 1 root admin 1994 Jul 4 23:59 /var/log/system.log.2.gz
-rw-r----- 1 root admin 6544 Jul 3 23:13 /var/log/system.log.3.gz
-rw-r----- 1 root admin 7301 Jun 27 19:27 /var/log/system.log.4.gz
-rw-r----- 1 root admin 2468 Jun 14 14:30 /var/log/system.log.5.gz
-rw-r----- 1 root admin 920 Jun 10 19:06 /var/log/system.log.6.gz
-rw-r----- 1 root admin 2105 Jun 10 00:06 /var/log/system.log.7.gz

</pre>So that explains the discrepancy.

As to why you are unable to run the maintenance tasks on your PowerBook, I'm not so sure. First try this command on both machines:

ls -ld /var/log

and see if you get the following output: <pre>

ibook:~ michaelc$ ls -ld /var/log
drwxr-xr-x 72 root wheel 2448 Jul 6 18:17 /var/log

</pre>(Obviously the numbers and dates may be different). Let us know what you get.

Then Repair Permissions on both machines and rerun all the "ls" commands to see how the permissions look now. I'm particularly interested in (a) whether the "Read" permission for "Other" disappears, and (b) whether that "wheel" group you have listed turns to "admin".

Then, let's force a rotation of your system.log on the PowerBook only:

sudo periodic daily

Press return and you will be prompted for your password. This is not echoed for security reasons: just type it and press return.

If you haven't used 'sudo' before, you will receive a little lecture before being prompted for the password. Read it and continue 🙂

When it's done, which won't take long at all, try the

ls -l /var/log/sys*

command again (only on the PowerBook) and let us know what it now says.

Jul 6, 2006 2:55 PM in response to Michael Conniff

right...

so what i've understood is that the discrepancy is the powerbook has a read permission for 'other' which obviously includes the non admin account that I work on?

I only have one system log on the powerbook because my unix maintenance task hasn't run and caused the log to 'rotate' and produce all the system.log.x.gz logs?

Well I have repaired permissions on both machines and the results are the same as before.

As for the powerbook not running the maintenance, is it possible that it is because I always switch it off after I use it? I use the powerbook much less than the mini. The mini sometimes goes a whole week without a reboot and it seems that i can read the last .gz log file produced in the non-admin account on the mini. I'm just assuming that the last system log made is readable to non-admin accounts, and as the powerbook is not producing them, then I have access to that first log?

Am i at all on the right track??

Jul 6, 2006 3:45 PM in response to Naj

Naj
Am i at all on the right track??
Yes 🙂

  1. The discrepancy is the powerbook has a read permission for 'other' — correct
  2. I only have one system log on the powerbook because my unix maintenance task hasn't run — it looks that way
Well I have repaired permissions on both machines and the results are the same as before
It is possible that Repair Permissions wouldn't affect these logs: About Disk Utility's Repair Disk Permissions feature says:
Also, certain files whose permissions can be changed during normal usage without affecting their function are intentionally not checked.
In fact, there is nothing in the Receipts folder to set the 'system.log' permissions. These are set on rotation by the daily maintenance to be owner root, group admin and permissions rw-r-----.

However, the Receipts does contain the information to set the ownership and permissions of the /var/log directory, so the two ls -ld /var/log commands should give the same results as mine.
As for the powerbook not running the maintenance, is it possible that it is because I always switch it off after I use it?
This would certainly make it not run as often as intended, but it should eventually get run. Look at my post above to see when mine were run recently. The two today are because I did one manually. But you'll also see some gaps — my machine sleeps when not in use, so the maintenance will run at some time after it wakes. But I was away a couple of times, so the machine never woke, hence the gaps.

I assume you didn't try logging into an admin account and rotating the log?

Jul 7, 2006 3:24 AM in response to Mark Jalbert

Hi Mark
Another Tiger difference?
It seems so! Just to be certain I copied and pasted your command, and as expected got nothing.

I had done it differently, not relying on it being in the BaseSystem package, and looked for everything that mentioned "/private/var/log". Some log files showed up in BaseSystem.pkg, and some others in Essentials.pkg. But no system.log anywhere!

Jul 28, 2006 1:20 PM in response to Michael Conniff

Hi,

I am very sorry for not posting back but I have been extremely busy the past couple weeks and have hardly had any time to look at this problem.

well I am checking my PB and it looks like the logs have rotated on their own !

ls -l /var/log/sys* gives me the following;

-rw-r----- 1 root admin 109180 Jul 28 21:15 /var/log/system.log
-rw-r--r-- 1 root wheel 105461 Jul 13 21:00 /var/log/system.log.0.gz

I now have a similar situation on my mini and PB, I take it all is Ok seeing as the maintenance has actually run?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

strange zipped .gz logs in console

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.