Bug 121523 - Old logs are world-readable
Old logs are world-readable
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: logrotate (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Cristian Gafton
: Security
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-22 09:28 EDT by Markku Kolkka
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 3.7.1-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-19 17:57:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to respect file rights when compressing log files (2.06 KB, patch)
2004-05-08 07:26 EDT, Daniel Himler
no flags Details | Diff

  None (edit)
Description Markku Kolkka 2004-04-22 09:28:07 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040312

Description of problem:
Logrotate gives everyone read access to the old log files even when
the current log is readable only by root.

Version-Release number of selected component (if applicable):
logrotate-3.7-4.1

How reproducible:
Always

Steps to Reproduce:
1.Let the system run for a couple of weeks
2.ls -l /var/log
3.
    

Actual Results:   ll /var/log
yhteens� 3052
-rw-r-----  1 root root     6826 22. huhti  11:15 acpid
-rw-------  1 root root    19906 22. huhti  12:21 boot.log
-rw-r--r--  1 root root     3474 18. huhti  13:41 boot.log.1.gz
-rw-r--r--  1 root root     3496 11. huhti  16:05 boot.log.2.gz
-rw-r--r--  1 root root     4460  4. huhti  13:22 boot.log.3.gz
-rw-------  1 root root    14717 22. huhti  16:30 cron
-rw-r--r--  1 root root     2422 18. huhti  13:41 cron.1.gz
-rw-r--r--  1 root root     2648 11. huhti  16:05 cron.2.gz
-rw-r--r--  1 root root     2348  4. huhti  13:22 cron.3.gz
drwxr-xr-x  2 lp   sys      4096 22. huhti  12:21 cups
-rw-r--r--  1 root root    12003 22. huhti  11:15 dmesg
drwxr-xr-x  2 root root     4096 22. huhti  11:16 gdm
-r--------  1 root root 19136220 22. huhti  11:48 lastlog
drwxr-xr-x  2 root root     4096 30. maalis 18:17 mail
-rw-------  1 root root   445837 22. huhti  16:23 maillog
-rw-r--r--  1 root root    95814 18. huhti  13:41 maillog.1.gz
-rw-r--r--  1 root root    98951 11. huhti  16:05 maillog.2.gz
-rw-r--r--  1 root root    69943  4. huhti  13:22 maillog.3.gz
-rw-------  1 root root   476055 22. huhti  16:21 messages
-rw-r--r--  1 root root   126389 18. huhti  13:41 messages.1.gz
-rw-r--r--  1 root root   139395 11. huhti  16:05 messages.2.gz
-rw-r--r--  1 root root   160602  4. huhti  13:22 messages.3.gz
-rw-r--r--  1 root root    39246 22. huhti  12:23 prelink.log
-rw-r--r--  1 root root    18976 22. huhti  12:23 rpmpkgs
-rw-r--r--  1 root root     5511 18. huhti  13:41 rpmpkgs.1.gz
-rw-r--r--  1 root root     5581 11. huhti  16:05 rpmpkgs.2.gz
-rw-r--r--  1 root root     5604  4. huhti  13:22 rpmpkgs.3.gz
-rw-r--r--  1 root root    28293 12. huhti  14:17 scrollkeeper.log
-rw-------  1 root root     4619 22. huhti  11:18 secure
-rw-r--r--  1 root root     1233 18. huhti  13:41 secure.1.gz
-rw-r--r--  1 root root     1161 11. huhti  16:05 secure.2.gz
-rw-r--r--  1 root root     1127  4. huhti  13:22 secure.3.gz
-rw-------  1 root root        0 18. huhti  13:41 spooler
-rw-r--r--  1 root root       20 18. huhti  13:41 spooler.1.gz
-rw-r--r--  1 root root       20 11. huhti  16:05 spooler.2.gz
-rw-r--r--  1 root root       20  4. huhti  13:22 spooler.3.gz
-rw-r--r--  1 root root    13085 22. huhti  11:42 up2date
-rw-r--r--  1 root root     3289 18. huhti  13:41 up2date.1.gz
-rw-r--r--  1 root root     1738 11. huhti  16:05 up2date.2.gz
-rw-r--r--  1 root root     2994  4. huhti  13:22 up2date.3.gz
drwxr-xr-x  2 root root     4096  3. maalis 04:19 vbox
-rw-rw-r--  1 root utmp   720000 22. huhti  14:15 wtmp
-rw-r--r--  1 root root     2395  1. huhti  13:26 wtmp.1.gz
-rw-r--r--  1 root root    47187 15. huhti  12:10 XFree86.0.log
-rw-r--r--  1 root root    46858 15. huhti  01:37 XFree86.0.log.old
-rw-r--r--  1 root root    45873 22. huhti  11:48 Xorg.0.log
-rw-r--r--  1 root root    46031 22. huhti  02:12 Xorg.0.log.old
-rwxr-xr-x  1 root root    11419 17. huhti  02:21 yum.log


Expected Results:  The compressed old logs should have the same rights
as the current log file

Additional info:
Comment 1 Daniel Himler 2004-05-08 07:26:25 EDT
Created attachment 100106 [details]
Patch to respect file rights when compressing log files

Hi!

The attached patch fixes this behaviour for me.

Bye,
Daniel
Comment 2 Miloslav Trmač 2004-10-19 17:57:11 EDT
Fixed in logrotate-3.7.1-2. Thanks for the patch.

Note You need to log in before you can comment on or make changes to this bug.